Skip to content

Commit 8483527

Browse files
committed
Fix formatting
1 parent 2baad81 commit 8483527

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

automation/cache/module.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ def search(self, i):
176176

177177
# Tags may be a list (if comes internally from CM scripts) or string if
178178
# comes from CMD
179-
if not isinstance(tags, if) tags = tags.strip()
179+
if not isinstance(tags, list):
180+
tags = tags.strip()
181+
180182
if ' ' in artifact: # or ',' in artifact:
181183
del (i['artifact'])
182184
if 'parsed_artifact' in i:

automation/script/module_misc.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,8 @@ def doc(i):
561561
desc = value
562562

563563

564-
if isinstance(value, if ) desc = value['desc']
564+
if isinstance(value, dict):
565+
desc = value['desc']
565566

566567
choices = value.get('choices', [])
567568
if len(choices) > 0:
@@ -1257,10 +1258,13 @@ def regenerate_script_cmd(i):
12571258
# Cleanup from env everything that has a host path value
12581259
if i_run_cmd.get('env'):
12591260
for key in list(i_run_cmd.get('env')):
1260-
if isinstance(i_run_cmd['env'][key], if ) del (i_run_cmd['env'][key])
1261-
elif isinstance(i_run_cmd['env'][key], elif ) values_to_remove = []
1261+
if isinstance(i_run_cmd['env'][key], str):
1262+
del (i_run_cmd['env'][key])
1263+
elif isinstance(i_run_cmd['env'][key], list):
1264+
values_to_remove = []
12621265
for val in i_run_cmd['env'][key]:
1263-
if isinstance(val, if ) values_to_remove.append(val)
1266+
if isinstance(val, str):
1267+
values_to_remove.append(val)
12641268
if values_to_remove == i_run_cmd['env'][key]:
12651269
del (i_run_cmd['env'][key])
12661270
else:

0 commit comments

Comments
 (0)