Skip to content

Commit 3336949

Browse files
author
krish_trip
committed
BEDGE-2722 handle Json Load Error
1 parent 5746b19 commit 3336949

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,15 @@ def load_conf(self):
680680
return
681681

682682
with open(SLAVES_FILE, 'r') as f:
683-
data = load(f)
683+
try:
684+
data = load(f)
685+
except ValueError as e:
686+
self.show_error(
687+
"LoadError: Failed to Load : %s "
688+
"\nSave Your Config File it will be overwritten"
689+
% e.message
690+
)
691+
return
684692

685693
if 'active_server' not in data or 'port' not in data \
686694
or 'slaves_list' not in data or 'slaves_memory' not in data or \

0 commit comments

Comments
 (0)