Only remove a stale pickle file if it exists

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce 2009-07-03 20:01:47 -07:00
parent 1875ddd47c
commit b0ca41e19a

View File

@ -262,8 +262,10 @@ class GitConfig(object):
finally:
fd.close()
except IOError:
if os.path.exists(self._pickle):
os.remove(self._pickle)
except cPickle.PickleError:
if os.path.exists(self._pickle):
os.remove(self._pickle)
def _ReadGit(self):