From d864c98760d2c6a405acc5b03d32b6ca6844a467 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver <thomas@kluyver.me.uk> Date: Fri, 23 Jun 2023 15:06:07 +0100 Subject: [PATCH] Allow for xfel-calibrate with no --karabo-id (as in tests) --- src/xfel_calibrate/calibrate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xfel_calibrate/calibrate.py b/src/xfel_calibrate/calibrate.py index bd0788a97..bc43ac424 100755 --- a/src/xfel_calibrate/calibrate.py +++ b/src/xfel_calibrate/calibrate.py @@ -613,7 +613,8 @@ def run(argv=None): out_path.mkdir(parents=True, exist_ok=True) # Use given report name, or automatic unique name if not specified - unique_name = f"{args['karabo_id']}-{nb_details.caltype}-{request_time:%y%m%d_%H%M%S.%f}" + det_name = args.get('karabo_id', nb_details.detector) + unique_name = f"{det_name}-{nb_details.caltype}-{request_time:%y%m%d_%H%M%S.%f}" if args['skip_report']: report_to = '' elif args["report_to"] is None: -- GitLab