diff --git a/apitools/base/py/credentials_lib.py b/apitools/base/py/credentials_lib.py
index <HASH>..<HASH> 100644
--- a/apitools/base/py/credentials_lib.py
+++ b/apitools/base/py/credentials_lib.py
@@ -302,6 +302,9 @@ class GceAssertionCredentials(gce.AppAssertionCredentials):
                             if (creds['scopes'] in
                                     (None, cached_creds['scopes'])):
                                 scopes = cached_creds['scopes']
+                except:  # pylint: disable=bare-except
+                    # Treat exceptions as a cache miss.
+                    pass
                 finally:
                     cache_file.unlock_and_close()
         return scopes
@@ -331,6 +334,9 @@ class GceAssertionCredentials(gce.AppAssertionCredentials):
                         # If it's not locked, the locking process will
                         # write the same data to the file, so just
                         # continue.
+                except:  # pylint: disable=bare-except
+                    # Treat exceptions as a cache miss.
+                    pass
                 finally:
                     cache_file.unlock_and_close()
Treat exceptions accessing GCE credential cache file as a cache miss

This fixes an issue where problems accessing the cache file on
the filesystem (for example, in a container with no mounted
filesystem) would cause apitools to abort entirely, as opposed to
simply not caching the credentials.

Fixes <URL>