Skip to content

Commit e654428

Browse files
committed
Updated args['trsh'] if condition
1 parent 2b5e18d commit e654428

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

arc/scheduler.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,19 @@ def run_job(self,
784784
self.deduce_job_adapter(level=Level(repr=level_of_theory), job_type=job_type)
785785
args = {'keyword': {}, 'block': {}}
786786
if trsh:
787-
args['trsh'] = {'trsh': trsh}
787+
if isinstance(trsh, (str, list)):
788+
args['trsh'] = {'trsh': trsh}
789+
elif isinstance(trsh, dict) and 'trsh' in args:
790+
for key, value in trsh.items():
791+
if key in args['trsh']:
792+
if isinstance(args['trsh'][key], list) and isinstance(value, list):
793+
args['trsh'][key].extend(value)
794+
else:
795+
args['trsh'][key] = value
796+
else:
797+
args['trsh'][key] = value
798+
else:
799+
args['trsh'] = trsh
788800
if shift:
789801
args['shift'] = shift
790802
if scan_trsh:

0 commit comments

Comments
 (0)