Bug fix for bitmath types in saved config
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
""" version info """
|
""" version info """
|
||||||
|
|
||||||
__version__ = "0.46.5"
|
__version__ = "0.46.6"
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user