mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-03-16 04:04:31 +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-variable,
|
||||
use-dict-literal,
|
||||
use-list-literal,
|
||||
# Cannot remove yet due to inadequacy of rules
|
||||
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]
|
||||
|
||||
try:
|
||||
name = container.get("Names", list())[0].lstrip("/")
|
||||
name = container.get("Names", [])[0].lstrip("/")
|
||||
full_name = name
|
||||
except IndexError:
|
||||
name = short_container_id
|
||||
|
||||
Loading…
Reference in New Issue
Block a user