1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixed calls to list.extend() (#2161)

* fixed calls to list.extend()

* added changelog fragment

* Update changelogs/fragments/2161-pkgutil-list-extend.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2021-04-05 09:38:59 +12:00 committed by GitHub
parent 95156a11a1
commit d92d0632eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- pkgutil - fixed calls to ``list.extend()`` (https://github.com/ansible-collections/community.general/pull/2161).

View file

@ -130,7 +130,7 @@ def packages_not_latest(module, names, site, update_catalog):
cmd.append('-U')
cmd.append('-c')
if site is not None:
cmd.extend('-t', site)
cmd.extend(['-t', site])
if names != ['*']:
cmd.extend(names)
rc, out, err = run_command(module, cmd)
@ -159,7 +159,7 @@ def package_install(module, state, pkgs, site, update_catalog, force):
if update_catalog:
cmd.append('-U')
if site is not None:
cmd.extend('-t', site)
cmd.extend(['-t', site])
if force:
cmd.append('-f')
cmd.extend(pkgs)
@ -174,7 +174,7 @@ def package_upgrade(module, pkgs, site, update_catalog, force):
if update_catalog:
cmd.append('-U')
if site is not None:
cmd.extend('-t', site)
cmd.extend(['-t', site])
if force:
cmd.append('-f')
cmd += pkgs