Report relative path in deprecated-config test.

pull/77400/head
Matt Clay 2 years ago
parent 87d52e0ce0
commit 4ccc4c5aeb

@ -89,11 +89,14 @@ def main():
)
base = os.path.join(os.path.dirname(ansible.config.__file__), 'base.yml')
root_path = os.path.dirname(os.path.dirname(os.path.dirname(ansible.__file__)))
relative_base = os.path.relpath(base, root_path)
with open(base) as f:
data = yaml.safe_load(f)
for result in find_deprecations(data):
print('%s: %s is scheduled for removal in %s' % (base, '.'.join(str(i) for i in result[0][:-2]), result[1]))
print('%s: %s is scheduled for removal in %s' % (relative_base, '.'.join(str(i) for i in result[0][:-2]), result[1]))
if __name__ == '__main__':

Loading…
Cancel
Save