[fix] pylint errors on modules packaging language (#30748)

* cleaning pylint errors for module packaging/language/*
This commit is contained in:
Hervé Beraud 2017-09-22 19:11:11 +02:00 committed by Toshio Kuratomi
parent e767c7d694
commit cddff32792
7 changed files with 39 additions and 38 deletions

View file

@ -139,10 +139,7 @@ def _is_package_installed(module, name, locallib, cpanm, version):
else:
cmd = "%s;'" % cmd
res, stdout, stderr = module.run_command(cmd, check_rc=False)
if res == 0:
return True
else:
return False
return res == 0
def _build_cmd_line(name, from_path, notest, locallib, mirror, mirror_only, installdeps, cpanm, use_sudo):
# this code should use "%s" like everything else and just return early but not fixing all of it now.
@ -175,9 +172,10 @@ def _build_cmd_line(name, from_path, notest, locallib, mirror, mirror_only, inst
def _get_cpanm_path(module):
if module.params['executable']:
return module.params['executable']
result = module.params['executable']
else:
return module.get_bin_path('cpanm', True)
result = module.get_bin_path('cpanm', True)
return result
def main():