From e928a3ec866f51a811299d2978f5e3d3b2c13819 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl=20Hasselstr=C3=B6m?= Date: Mon, 12 Jan 2009 21:04:10 +0100 Subject: [PATCH] Return None instead of crashing on undefined integer config items MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Karl Hasselström --- stgit/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stgit/config.py b/stgit/config.py index 8934445..5b47580 100644 --- a/stgit/config.py +++ b/stgit/config.py @@ -65,7 +65,9 @@ class GitConfig: def getint(self, name): value = self.get(name) - if value.isdigit(): + if value == None: + return None + elif value.isdigit(): return int(value) else: raise GitConfigException, 'Value for "%s" is not an integer: "%s"' % (name, value) -- 2.11.0