mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 09:42:57 -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:
|
try:
|
||||||
with open(in_file_path, 'r') as inFile:
|
with open(in_file_path, 'r') as inFile:
|
||||||
metadata = json.load(inFile)
|
metadata = json.load(inFile)
|
||||||
except IOError as e:
|
except (IOError, ValueError) as e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if metadata:
|
if metadata:
|
||||||
|
@ -1162,7 +1162,7 @@ class PmsConnect(object):
|
||||||
try:
|
try:
|
||||||
with open(out_file_path, 'w') as outFile:
|
with open(out_file_path, 'w') as outFile:
|
||||||
json.dump(metadata, 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"
|
logger.error(u"Tautulli Pmsconnect :: Unable to create cache file for metadata (sessionKey %s): %s"
|
||||||
% (cache_key, e))
|
% (cache_key, e))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue