Skip to content

Commit 7d50e5f

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Replace assert with condition"
2 parents fba356b + ca90985 commit 7d50e5f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

openstackclient/image/v2/image.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,9 +1031,7 @@ def take_action(self, parsed_args):
10311031

10321032
if parsed_args.properties:
10331033
for k in parsed_args.properties:
1034-
try:
1035-
assert(k in image.keys())
1036-
except AssertionError:
1034+
if k not in image:
10371035
LOG.error(_("property unset failed, '%s' is a "
10381036
"nonexistent property "), k)
10391037
propret += 1

0 commit comments

Comments
 (0)