From 8e4b59e40bcc3603dd2401f4a83b983b8c364a2f Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 11 May 2023 20:01:33 -0500 Subject: [PATCH] Name proper exception for _precheck func, remove unnecessary comments/print in helpers.py --- phototag/helpers.py | 8 +------- phototag/process.py | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/phototag/helpers.py b/phototag/helpers.py index eb16a24..29fb0ee 100644 --- a/phototag/helpers.py +++ b/phototag/helpers.py @@ -19,15 +19,11 @@ ALL_EXTENSIONS = RAW_EXTS + LOSSY_EXTS logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) -# kB Kilobyte -# KB/KiB Kibibyte -# Kb Kibibit -# kb Kilobit - byte_magnitudes = { "B": 1, } +# Generate every variation of byte suffixes for magnitude, suffix_kibi in enumerate(["K", "M", "G", "T", "P", "E", "Z", "Y"], start=0): suffix_kilo = suffix_kibi.lower() values: List[Tuple[str, int]] = [ @@ -46,8 +42,6 @@ for magnitude, suffix_kibi in enumerate(["K", "M", "G", "T", "P", "E", "Z", "Y"] for suffix, scale in values: byte_magnitudes[suffix] = scale -print(byte_magnitudes) - def valid_extension(extension: str) -> bool: """ diff --git a/phototag/process.py b/phototag/process.py index 4c7c604..a8e471a 100644 --- a/phototag/process.py +++ b/phototag/process.py @@ -78,7 +78,7 @@ class MasterFileProcessor(object): """ Checks that the MasterFileProcessor can successfully process all files with the current configuration options. - :except Exception: when the current configuration will be unable to complete based on the current parameters. + :except InvalidConfigurationError: when the current configuration will be unable to complete based on the current parameters. """ # single_override ensures that the application will always complete, even if slowly, one-by-one if not self.single_override: