mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 16:52:58 -07:00
Catch json ValueError in metadata cache
This commit is contained in:
parent
d2fccbde68
commit
5ca65f4797
1 changed files with 2 additions and 2 deletions
|
@ -537,7 +537,7 @@ class PmsConnect(object):
|
|||
try:
|
||||
with open(in_file_path, 'r') as inFile:
|
||||
metadata = json.load(inFile)
|
||||
except IOError as e:
|
||||
except (IOError, ValueError) as e:
|
||||
pass
|
||||
|
||||
if metadata:
|
||||
|
@ -1162,7 +1162,7 @@ class PmsConnect(object):
|
|||
try:
|
||||
with open(out_file_path, 'w') as outFile:
|
||||
json.dump(metadata, outFile)
|
||||
except IOError as e:
|
||||
except (IOError, ValueError) as e:
|
||||
logger.error(u"Tautulli Pmsconnect :: Unable to create cache file for metadata (sessionKey %s): %s"
|
||||
% (cache_key, e))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue