From 26f916e4cbf4f28154c47aa2de1fdbc0aebc65b3 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Sat, 26 Feb 2022 15:23:46 -0800 Subject: [PATCH] Bug fix for bitmath types in saved config --- osxphotos/_version.py | 2 +- osxphotos/configoptions.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/osxphotos/_version.py b/osxphotos/_version.py index 83c49fcd..db451b4a 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,3 +1,3 @@ """ version info """ -__version__ = "0.46.5" +__version__ = "0.46.6" diff --git a/osxphotos/configoptions.py b/osxphotos/configoptions.py index 7e71b574..079847a3 100644 --- a/osxphotos/configoptions.py +++ b/osxphotos/configoptions.py @@ -1,4 +1,5 @@ """ ConfigOptions class to load/save config settings for osxphotos CLI """ +import bitmath import toml __all__ = [ @@ -178,6 +179,10 @@ class ConfigOptions: data = {} for attr in sorted(self._attrs.keys()): val = getattr(self, attr) + + if isinstance(val, bitmath.Bitmath): + val = int(val.to_Byte()) + if val in [False, ()]: val = None else: