diff options
-rw-r--r-- | git_config.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git_config.py b/git_config.py index 138470c5..8e3dfb1b 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -257,9 +257,11 @@ class GitConfig(object): | |||
257 | finally: | 257 | finally: |
258 | fd.close() | 258 | fd.close() |
259 | except IOError: | 259 | except IOError: |
260 | os.remove(self._pickle) | 260 | if os.path.exists(self._pickle): |
261 | os.remove(self._pickle) | ||
261 | except cPickle.PickleError: | 262 | except cPickle.PickleError: |
262 | os.remove(self._pickle) | 263 | if os.path.exists(self._pickle): |
264 | os.remove(self._pickle) | ||
263 | 265 | ||
264 | def _ReadGit(self): | 266 | def _ReadGit(self): |
265 | """ | 267 | """ |