Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def load_tokens():
"""Get "browser" tokens from disc"""
try:
with open(tfile, 'rb') as f:
tokens = pickle.load(f)
# backwards compatability
tokens = {k: (GCSFileSystem._dict_to_credentials(v)
if isinstance(v, dict) else v)
for k, v in tokens.items()}
except Exception:
tokens = {}
GCSFileSystem.tokens = tokens