diff --git a/src/xfel_calibrate/nb_args.py b/src/xfel_calibrate/nb_args.py index bc3ac261bf4626a982a9055f8276ea3742a29466..3dc5280b922b3f52bea0a0f39c1cb1f448c1bfc7 100644 --- a/src/xfel_calibrate/nb_args.py +++ b/src/xfel_calibrate/nb_args.py @@ -414,7 +414,8 @@ def parse_argv_and_load_nb(argv) -> Tuple[Dict, NBDetails]: not_reproducible_args = sorted( ('--' + x.replace('_', '-') for x in ['skip_env_freeze'] - if args[x])) + if getattr(args, x)) + ) # If any of these arguments are set, present a warning. if not_reproducible_args: