File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import os
1616import six
1717import json
18+ import logging
1819import hashlib
1920import tempfile
21+ from functools import partial
2022from collections import defaultdict
2123from abc import abstractmethod , abstractproperty
2224
@@ -54,11 +56,12 @@ def __init_cache(self, refresh=False):
5456 else :
5557 try :
5658 with open (self .__cache_file , 'r' ) as f :
57- self ._cache = json .load (f , cls = CacheDecoder ( self .client ))
59+ self ._cache = json .load (f , cls = partial ( CacheDecoder , self .client ))
5860 if self ._cache .get ('library_version' ) != __version__ :
5961 # Version mismatch, need to refresh cache
6062 self .invalidate_cache ()
61- except Exception :
63+ except Exception as e :
64+ logging .error ("load cache error: %s" , e )
6265 self .invalidate_cache ()
6366 self ._load_server_info ()
6467 self .discover ()
You can’t perform that action at this time.
0 commit comments