ansible/parsing: PEP8 compliancy (#24701)

- Make PEP8 compliant
This commit is contained in:
Dag Wieers 2017-05-18 19:41:00 +02:00 committed by John R Barker
parent 5babe2daea
commit 6f6bdf7914
12 changed files with 58 additions and 71 deletions

View file

@ -237,15 +237,17 @@ class DataLoader:
b_main = b'main%s' % (suffix)
b_tasked = b'tasks/%s' % (b_main)
if b_path.endswith(b'tasks') and os.path.exists(os.path.join(b_path, b_main)) \
or os.path.exists(os.path.join(b_upath, b_tasked)) \
or os.path.exists(os.path.join(os.path.dirname(b_path), b_tasked)):
if (
b_path.endswith(b'tasks') and
os.path.exists(os.path.join(b_path, b_main)) or
os.path.exists(os.path.join(b_upath, b_tasked)) or
os.path.exists(os.path.join(os.path.dirname(b_path), b_tasked))
):
isit = True
break
return isit
def path_dwim_relative(self, path, dirname, source, is_role=False):
'''
find one file in either a role or playbook dir with or without
@ -283,7 +285,7 @@ class DataLoader:
search.append(self.path_dwim(os.path.join(basedir, 'tasks', source)))
# try to create absolute path for loader basedir + templates/files/vars + filename
search.append(self.path_dwim(os.path.join(dirname,source)))
search.append(self.path_dwim(os.path.join(dirname, source)))
search.append(self.path_dwim(os.path.join(basedir, source)))
# try to create absolute path for loader basedir + filename