Improve interpreter exit-related logic
This commit is contained in:
parent
dcbbbbd09d
commit
272fa5f93b
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ from zoneinfo import ZoneInfo
|
||||||
import dataclasses_json
|
import dataclasses_json
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
@dataclass_json
|
@dataclass_json
|
||||||
|
|
@ -69,7 +70,7 @@ class Configuration:
|
||||||
try:
|
try:
|
||||||
configuration = json.loads(config_file_contents)
|
configuration = json.loads(config_file_contents)
|
||||||
except JSONDecodeError:
|
except JSONDecodeError:
|
||||||
exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# noinspection PyUnresolvedReferences
|
# noinspection PyUnresolvedReferences
|
||||||
configuration = Configuration.from_dict(configuration)
|
configuration = Configuration.from_dict(configuration)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue