Skip to content
Snippets Groups Projects
Commit 22538ead authored by inso's avatar inso
Browse files

Support json errors in parameters file reading

parent d3d628ac
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,6 @@ class UserParametersFile:
with open(self._file, 'r') as json_data:
user_parameters = UserParameters(**json.load(json_data))
user_parameters.profile_name = profile_name
except OSError:
except (OSError, json.decoder.JSONDecodeError):
user_parameters = UserParameters(profile_name=profile_name)
return user_parameters
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment