diff options
Diffstat (limited to 'git_config.py')
| -rw-r--r-- | git_config.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git_config.py b/git_config.py index bc70d160..3cd09391 100644 --- a/git_config.py +++ b/git_config.py | |||
| @@ -371,9 +371,10 @@ class GitConfig(object): | |||
| 371 | 371 | ||
| 372 | """ | 372 | """ |
| 373 | c = {} | 373 | c = {} |
| 374 | d = self._do('--null', '--list') | 374 | if not os.path.exists(self.file): |
| 375 | if d is None: | ||
| 376 | return c | 375 | return c |
| 376 | |||
| 377 | d = self._do('--null', '--list') | ||
| 377 | for line in d.rstrip('\0').split('\0'): | 378 | for line in d.rstrip('\0').split('\0'): |
| 378 | if '\n' in line: | 379 | if '\n' in line: |
| 379 | key, val = line.split('\n', 1) | 380 | key, val = line.split('\n', 1) |
