From 6877964ef4482b993430964f8eebec4a78ae7b7c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 1 May 2017 08:56:47 +0100 Subject: git-phab: Handle NoSection exception from configparser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the user doesn’t have a `phab` section in their configuration, they will hit this exception, spuriously. Signed-off-by: Philip Withnall Differential Revision: https://phabricator.freedesktop.org/D1738 --- git-phab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-phab b/git-phab index ee9ff67..c2bd3e4 100755 --- a/git-phab +++ b/git-phab @@ -577,7 +577,7 @@ Paste API Token from that page and press : """ % self.phabricator_uri) try: self.autostash |= self.repo.config_reader().get_value( 'phab', 'autostash') - except configparser.NoOptionError: + except (configparser.NoOptionError, configparser.NoSectionError): pass # Try to guess the task from branch name -- cgit v1.2.3