mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
fix python black formatting
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
This commit is contained in:
parent
b0517d1cfb
commit
b2fdc87366
3 changed files with 13 additions and 14 deletions
|
|
@ -2524,11 +2524,11 @@ class Cmd_nm(Cmd):
|
|||
% (
|
||||
con.get_id(),
|
||||
con.get_uuid(),
|
||||
"not-active"
|
||||
if not is_active
|
||||
else "is-modified"
|
||||
if is_modified
|
||||
else "force-state-change",
|
||||
(
|
||||
"not-active"
|
||||
if not is_active
|
||||
else "is-modified" if is_modified else "force-state-change"
|
||||
),
|
||||
),
|
||||
)
|
||||
self.connections_data_set_changed(idx)
|
||||
|
|
@ -2784,11 +2784,11 @@ class Cmd_initscripts(Cmd):
|
|||
"up connection %s (%s)"
|
||||
% (
|
||||
name,
|
||||
"not-active"
|
||||
if is_active is not True
|
||||
else "is-modified"
|
||||
if is_modified
|
||||
else "force-state-change",
|
||||
(
|
||||
"not-active"
|
||||
if is_active is not True
|
||||
else "is-modified" if is_modified else "force-state-change"
|
||||
),
|
||||
),
|
||||
)
|
||||
cmd = "ifup"
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ class ArgValidatorDict(ArgValidator):
|
|||
items = list(value.items())
|
||||
except AttributeError:
|
||||
raise ValidationError(name, "invalid content is not a dictionary")
|
||||
for (setting, value) in items:
|
||||
for setting, value in items:
|
||||
try:
|
||||
validator = self.nested[setting]
|
||||
except KeyError:
|
||||
|
|
@ -493,7 +493,7 @@ class ArgValidatorDict(ArgValidator):
|
|||
except ValidationError as e:
|
||||
raise ValidationError(e.name, e.error_message)
|
||||
result[setting] = validated_value
|
||||
for (setting, validator) in self.nested.items():
|
||||
for setting, validator in self.nested.items():
|
||||
if setting in seen_keys:
|
||||
continue
|
||||
if validator.required:
|
||||
|
|
@ -543,7 +543,7 @@ class ArgValidatorList(ArgValidator):
|
|||
value = [s for s in value.split(" ") if s]
|
||||
|
||||
result = []
|
||||
for (idx, v) in enumerate(value):
|
||||
for idx, v in enumerate(value):
|
||||
if (v is None or v == "") and self.remove_none_or_empty:
|
||||
continue
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -5270,7 +5270,6 @@ class TestValidatorDictBond(Python26CompatTestCase):
|
|||
]
|
||||
|
||||
def test_invalid_bond_option_ad(self):
|
||||
|
||||
"""
|
||||
Test the ad bond option restrictions
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue