mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
* Fix linting errors.
* Fix bugs.
* Another linter error ignored.
* More fixes.
* Ignore sanity errors with older versions.
ci_complete
* Forgot to commit more changes.
(cherry picked from commit a54af8909c)
This commit is contained in:
@@ -124,7 +124,7 @@ from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||
|
||||
def add_remote(module, binary, name, flatpakrepo_url, method):
|
||||
"""Add a new remote."""
|
||||
global result
|
||||
global result # pylint: disable=global-variable-not-assigned
|
||||
command = [binary, "remote-add", "--{0}".format(method), name, flatpakrepo_url]
|
||||
_flatpak_command(module, module.check_mode, command)
|
||||
result['changed'] = True
|
||||
@@ -132,7 +132,7 @@ def add_remote(module, binary, name, flatpakrepo_url, method):
|
||||
|
||||
def remove_remote(module, binary, name, method):
|
||||
"""Remove an existing remote."""
|
||||
global result
|
||||
global result # pylint: disable=global-variable-not-assigned
|
||||
command = [binary, "remote-delete", "--{0}".format(method), "--force", name]
|
||||
_flatpak_command(module, module.check_mode, command)
|
||||
result['changed'] = True
|
||||
@@ -153,7 +153,7 @@ def remote_exists(module, binary, name, method):
|
||||
|
||||
|
||||
def _flatpak_command(module, noop, command):
|
||||
global result
|
||||
global result # pylint: disable=global-variable-not-assigned
|
||||
result['command'] = ' '.join(command)
|
||||
if noop:
|
||||
result['rc'] = 0
|
||||
|
||||
Reference in New Issue
Block a user