diff options
Diffstat (limited to 'git_config.py')
-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 2655939b..b47bc66f 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -262,9 +262,11 @@ class GitConfig(object): | |||
262 | finally: | 262 | finally: |
263 | fd.close() | 263 | fd.close() |
264 | except IOError: | 264 | except IOError: |
265 | os.remove(self._pickle) | 265 | if os.path.exists(self._pickle): |
266 | os.remove(self._pickle) | ||
266 | except cPickle.PickleError: | 267 | except cPickle.PickleError: |
267 | os.remove(self._pickle) | 268 | if os.path.exists(self._pickle): |
269 | os.remove(self._pickle) | ||
268 | 270 | ||
269 | def _ReadGit(self): | 271 | def _ReadGit(self): |
270 | """ | 272 | """ |