forked from LBRYCommunity/lbry-sdk
handle not being able to decode claim cache file
This commit is contained in:
parent
f515583ec4
commit
824f2f1d0f
1 changed files with 7 additions and 3 deletions
|
@ -350,9 +350,13 @@ class Daemon(AuthJSONRPCServer):
|
|||
name_cache_filename = os.path.join(self.db_dir, "stream_info_cache.json")
|
||||
|
||||
if os.path.isfile(name_cache_filename):
|
||||
with open(name_cache_filename, "r") as name_cache:
|
||||
self.name_cache = json.loads(name_cache.read())
|
||||
with open(name_cache_filename, "r") as name_cache_file:
|
||||
name_cache = name_cache_file.read()
|
||||
try:
|
||||
self.name_cache = json.loads(name_cache)
|
||||
log.info("Loaded claim info cache")
|
||||
except ValueError:
|
||||
log.warning("Unable to load claim info cache")
|
||||
|
||||
def _check_network_connection(self):
|
||||
self.connected_to_internet = utils.check_connection()
|
||||
|
|
Loading…
Reference in a new issue