mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-05-22 15:17:29 +08:00
Only remove a stale pickle file if it exists
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
parent
1875ddd47c
commit
b0ca41e19a
@ -262,8 +262,10 @@ class GitConfig(object):
|
|||||||
finally:
|
finally:
|
||||||
fd.close()
|
fd.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
if os.path.exists(self._pickle):
|
||||||
os.remove(self._pickle)
|
os.remove(self._pickle)
|
||||||
except cPickle.PickleError:
|
except cPickle.PickleError:
|
||||||
|
if os.path.exists(self._pickle):
|
||||||
os.remove(self._pickle)
|
os.remove(self._pickle)
|
||||||
|
|
||||||
def _ReadGit(self):
|
def _ReadGit(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user