mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 06:30:19 -07:00
[fix] pylint errors on modules packaging language (#30748)
* cleaning pylint errors for module packaging/language/*
This commit is contained in:
parent
e767c7d694
commit
cddff32792
7 changed files with 39 additions and 38 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue