- 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

@ -18,6 +18,7 @@ CHANGELOG for FlatCAM beta
- set the default layout on first run to the 'minimal' value
- modified the method that detects which tab was closed in the Plot Area so it will no longer depend on it's translated text but on it's objectName set on the QTab creation
- fixed the merge methods for all FlatCAM objects
- fixed a SyntaxError Exception when checking for types of found old preferences
28.04.2020

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)