- fixed a SyntaxError Exception when checking for types of found old preferences

This commit is contained in:
Marius Stanciu
2020-04-29 12:57:39 +03:00
committed by Marius
parent b8d85d2be2
commit c9f6c7efcb
2 changed files with 3 additions and 2 deletions

View File

@@ -775,13 +775,13 @@ class FlatCAMDefaults:
# may be stored as strings we check their types.
try:
target = eval(self.defaults[k])
except (NameError, TypeError):
except (NameError, TypeError, SyntaxError):
# it's an unknown string leave it as it is
target = deepcopy(self.factory_defaults[k])
try:
source = eval(v)
except NameError:
except (NameError, TypeError, SyntaxError):
# it's an unknown string leave it as it is
source = deepcopy(v)