Style adjustment of a constant.
Perhaps slight exaggeration. The value is set just after imports, depending on a single condition, but before declaring anything else. Thus making it quasi-constant. Still, it is beneficial from readability perspective. Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: Ieddc2cabd2612fa406a9660daa17a836ea1ee4cf
This commit is contained in:
parent
a0db6e4892
commit
172a49584a
@ -39,9 +39,9 @@ except NameError:
|
||||
|
||||
try:
|
||||
version = pkg_resources.get_distribution("ansible_runner").version
|
||||
backward_compat = (version < '1.4.0')
|
||||
BACKWARD_COMPAT = (version < '1.4.0')
|
||||
except pkg_resources.DistributionNotFound:
|
||||
backward_compat = False
|
||||
BACKWARD_COMPAT = False
|
||||
|
||||
|
||||
class Ansible(object):
|
||||
@ -433,7 +433,7 @@ class Ansible(object):
|
||||
'ident': ''
|
||||
}
|
||||
|
||||
if not backward_compat:
|
||||
if not BACKWARD_COMPAT:
|
||||
r_opts.update({
|
||||
'envvars': envvars,
|
||||
'project_dir': playbook_dir,
|
||||
@ -458,7 +458,7 @@ class Ansible(object):
|
||||
runner_config.prepare()
|
||||
runner_config.env['ANSIBLE_STDOUT_CALLBACK'] = \
|
||||
envvars['ANSIBLE_STDOUT_CALLBACK']
|
||||
if backward_compat:
|
||||
if BACKWARD_COMPAT:
|
||||
runner_config.env.update(envvars)
|
||||
|
||||
runner = ansible_runner.Runner(config=runner_config)
|
||||
|
Loading…
x
Reference in New Issue
Block a user