From: Catalin Marinas Date: Sat, 17 Oct 2009 21:52:33 +0000 (+0100) Subject: Ignore the git-config exit code X-Git-Tag: v0.15-rc4~2 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/a1c48461f23a99e16df27a777f6ae8833fb23365 Ignore the git-config exit code The stgit.config code dumps a stack trace if git-config returns an error (when, for example, there is no ~/.gitconfig file). Signed-off-by: Catalin Marinas --- diff --git a/stgit/config.py b/stgit/config.py index bfb117d..796f2c9 100644 --- a/stgit/config.py +++ b/stgit/config.py @@ -48,7 +48,8 @@ class GitConfig: if self.__cache is not None: return self.__cache = {} - lines = Run('git', 'config', '--null', '--list').raw_output() + lines = Run('git', 'config', '--null', '--list' + ).discard_exitcode().raw_output() for line in filter(None, lines.split('\0')): key, value = line.split('\n', 1) self.__cache.setdefault(key, []).append(value)