Skip to content
Snippets Groups Projects
Commit 64fc1306 authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

Launcher script: added a catch for json decode errors

parent be94de35
Branches
No related tags found
No related merge requests found
......@@ -17,8 +17,12 @@ class ErrorCodes(Enum):
# Class representing the VA-Launcher config (.json) file
class LauncherConfig:
def __init__(conf, sConfigFile):
with open( sConfigFile ) as json_file:
json_config = json.load(json_file)
try:
with open( sConfigFile ) as json_file:
json_config = json.load(json_file)
except Exception as e:
print( "ERROR reading the json config:" + os.linesep + str(e) )
sys.exit( ErrorCodes.ERROR_INCOMPLETE_CONFIG )
try:
conf.dVirtualAcousticDirectories = json_config["dVAServerDirectories"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment