diff options
Diffstat (limited to 'git_config.py')
-rw-r--r-- | git_config.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/git_config.py b/git_config.py index 778e81a4..bc70d160 100644 --- a/git_config.py +++ b/git_config.py | |||
@@ -352,8 +352,8 @@ class GitConfig(object): | |||
352 | Trace(': parsing %s', self.file) | 352 | Trace(': parsing %s', self.file) |
353 | with open(self._json) as fd: | 353 | with open(self._json) as fd: |
354 | return json.load(fd) | 354 | return json.load(fd) |
355 | except (IOError, ValueError): | 355 | except (IOError, ValueErrorl): |
356 | platform_utils.remove(self._json) | 356 | platform_utils.remove(self._json, missing_ok=True) |
357 | return None | 357 | return None |
358 | 358 | ||
359 | def _SaveJson(self, cache): | 359 | def _SaveJson(self, cache): |
@@ -361,8 +361,7 @@ class GitConfig(object): | |||
361 | with open(self._json, 'w') as fd: | 361 | with open(self._json, 'w') as fd: |
362 | json.dump(cache, fd, indent=2) | 362 | json.dump(cache, fd, indent=2) |
363 | except (IOError, TypeError): | 363 | except (IOError, TypeError): |
364 | if os.path.exists(self._json): | 364 | platform_utils.remove(self._json, missing_ok=True) |
365 | platform_utils.remove(self._json) | ||
366 | 365 | ||
367 | def _ReadGit(self): | 366 | def _ReadGit(self): |
368 | """ | 367 | """ |