mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[fix] pylint errors on modules packaging language (#30748)
* cleaning pylint errors for module packaging/language/*
This commit is contained in:
committed by
Toshio Kuratomi
parent
e767c7d694
commit
cddff32792
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user