diff --git a/src/cristallina/utils.py b/src/cristallina/utils.py index d2a85da..69fe1d7 100644 --- a/src/cristallina/utils.py +++ b/src/cristallina/utils.py @@ -88,8 +88,8 @@ def print_run_info( for file in files_in_step: try: total_size += os.path.getsize(file) - except FileNotFoundError as e: - pass + except (FileNotFoundError, PermissionError) as e: + logger.warning(f"Cannot access {file}.") print(f"Total file size: {total_size/(1024*1024*1024):.1f} GB\n") @@ -98,6 +98,7 @@ def print_run_info( print("\n".join([str(c) for c in ch])) # print only channels for first step break + def number_of_steps(scan_number_or_scan): """Returns number of steps for a scan object or run number""" scan = get_scan_from_run_number_or_scan(scan_number_or_scan)