Skip to content

Commit 561314d

Browse files
committed
fix json parsing error
1 parent 0e52c3e commit 561314d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

devdocs_desktop.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ def write_settings_json(self, filename, data):
195195

196196
def read_settings_json(self, filename):
197197
path = self.settings_path('%s.json' % filename)
198-
data = open(path).read() if os.path.exists(path) else None
198+
data = open(path).read() if os.path.exists(path) else '{}'
199199

200-
return json.loads(data)
200+
return json.loads(str(data))
201201

202202
def set_window_accel_groups(self):
203203
group = Gtk.AccelGroup()

0 commit comments

Comments
 (0)