mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-04-09 11:35:03 +00:00
Address use-list-literal.
This commit is contained in:
parent
98c5a4a7d8
commit
c45bd75cfc
@ -395,7 +395,6 @@ disable=raw-checker-failed,
|
|||||||
unused-argument,
|
unused-argument,
|
||||||
unused-variable,
|
unused-variable,
|
||||||
use-dict-literal,
|
use-dict-literal,
|
||||||
use-list-literal,
|
|
||||||
# Cannot remove yet due to inadequacy of rules
|
# Cannot remove yet due to inadequacy of rules
|
||||||
inconsistent-return-statements, # doesn't notice that fail_json() does not return
|
inconsistent-return-statements, # doesn't notice that fail_json() does not return
|
||||||
|
|
||||||
|
|||||||
@ -247,7 +247,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
|||||||
short_container_id = container_id[:13]
|
short_container_id = container_id[:13]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
name = container.get("Names", list())[0].lstrip("/")
|
name = container.get("Names", [])[0].lstrip("/")
|
||||||
full_name = name
|
full_name = name
|
||||||
except IndexError:
|
except IndexError:
|
||||||
name = short_container_id
|
name = short_container_id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user