From 6e1df66e16735cea5bdc9216312b2007633de3d7 Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 13 Dec 2023 09:28:33 +0200 Subject: [PATCH] . --- arc/scheduler.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arc/scheduler.py b/arc/scheduler.py index 2037be1ab6..7d36015879 100644 --- a/arc/scheduler.py +++ b/arc/scheduler.py @@ -786,19 +786,17 @@ def run_job(self, if trsh: if isinstance(trsh, (str, list)): args['trsh'] = {'trsh': trsh} - # if trsh is a dictionary - elif isinstance(trsh, dict): - if 'trsh' in args: - for key, value in trsh.items(): - if key in args['trsh']: - if isinstance(args['trsh'][key], list) and isinstance(value, list): - args['trsh'][key].extend(value) - else: - args['trsh'][key] = value + elif isinstance(trsh, dict) and 'trsh' in args: + for key, value in trsh.items(): + if key in args['trsh']: + if isinstance(args['trsh'][key], list) and isinstance(value, list): + args['trsh'][key].extend(value) else: args['trsh'][key] = value - else: - args['trsh'] = trsh + else: + args['trsh'][key] = value + else: + args['trsh'] = trsh if shift: args['shift'] = shift if scan_trsh: