Bug fix for bitmath types in saved config

This commit is contained in:
Rhet Turnbull
2022-02-26 15:23:46 -08:00
parent 4e9e877b27
commit 26f916e4cb
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,3 @@
""" version info """ """ version info """
__version__ = "0.46.5" __version__ = "0.46.6"

View File

@@ -1,4 +1,5 @@
""" ConfigOptions class to load/save config settings for osxphotos CLI """ """ ConfigOptions class to load/save config settings for osxphotos CLI """
import bitmath
import toml import toml
__all__ = [ __all__ = [
@@ -178,6 +179,10 @@ class ConfigOptions:
data = {} data = {}
for attr in sorted(self._attrs.keys()): for attr in sorted(self._attrs.keys()):
val = getattr(self, attr) val = getattr(self, attr)
if isinstance(val, bitmath.Bitmath):
val = int(val.to_Byte())
if val in [False, ()]: if val in [False, ()]:
val = None val = None
else: else: