Skip to content

Commit 22345e4

Browse files
committed
🐛 - Return empty JSON instead of None
Might Close #126.
1 parent d253bf6 commit 22345e4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • plugin.program.autowidget/resources/lib/common

plugin.program.autowidget/resources/lib/common/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def wipe(folder=_addon_data, over=False):
264264
if choice or over:
265265
dirs = xbmcvfs.listdir(folder)[0]
266266
files = xbmcvfs.listdir(folder)[1]
267-
267+
268268
for f in files:
269269
path = os.path.join(folder, f)
270270
remove_file(path)
@@ -449,7 +449,7 @@ def write_file(file, content, mode="w"):
449449
return False
450450

451451

452-
def read_json(file, log_file=False, default=None):
452+
def read_json(file, log_file=False, default={}):
453453
data = None
454454
if xbmcvfs.exists(file):
455455
with xbmcvfs.File(file) as f:

0 commit comments

Comments
 (0)