File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## v0.6.11
4
+
5
+ * Log warnings if failed to read or write to the local access token cache.
6
+
3
7
## v0.6.10
4
8
5
9
* Fix for ` ImportError: cannot import name 'appengine' from 'urllib3.contrib' `
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- __version_info__ = (0 , 6 , 10 )
15
+ __version_info__ = (0 , 6 , 11 )
16
16
__version__ = "." .join (map (str , __version_info__ ))
Original file line number Diff line number Diff line change @@ -126,7 +126,8 @@ def _read_cache() -> dict:
126
126
try :
127
127
with open (_cache_file (), 'r' ) as cache :
128
128
return json .loads (cache .read ())
129
- except Exception :
129
+ except Exception as e :
130
+ logger .warning (f'Failed to read token cache { _cache_file ()} : { e } ' )
130
131
return {}
131
132
132
133
@@ -147,8 +148,8 @@ def _write_token_cache(creds: ClientCredentials):
147
148
148
149
with open (_cache_file (), 'w' ) as f :
149
150
f .write (json .dumps (cache , default = vars ))
150
- except Exception :
151
- pass
151
+ except Exception as e :
152
+ logger . warning ( f'Failed to write to token cache { _cache_file () } : { e } ' )
152
153
153
154
154
155
# Returns the current access token if valid, otherwise requests new token.
You can’t perform that action at this time.
0 commit comments