mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-30 17:06:19 +00:00
[PR #11121/c45fba54 backport][stable-12] fix ruff case E721 (#11133)
fix ruff case E721 (#11121)
* fix ruff case E721
* add changelog frag
(cherry picked from commit c45fba549f)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
1d28e48d85
commit
ac6c6df2c7
3 changed files with 4 additions and 3 deletions
|
|
@ -2489,7 +2489,7 @@ class Nmcli:
|
|||
if key and len(pair) > 1:
|
||||
raw_value = pair[1].lstrip()
|
||||
if raw_value == "--":
|
||||
if key_type == list:
|
||||
if key_type is list:
|
||||
conn_info[key] = []
|
||||
else:
|
||||
conn_info[key] = None
|
||||
|
|
@ -2504,7 +2504,7 @@ class Nmcli:
|
|||
conn_info[alias_key] = alias_value
|
||||
elif key in ("ipv4.routes", "ipv6.routes"):
|
||||
conn_info[key] = [s.strip() for s in raw_value.split(";")]
|
||||
elif key_type == list:
|
||||
elif key_type is list:
|
||||
conn_info[key] = [s.strip() for s in raw_value.split(",")]
|
||||
else:
|
||||
m_enum = p_enum_value.match(raw_value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue