From: Guido van Rossum Date: Mon, 6 Mar 2000 14:43:20 +0000 (+0000) Subject: In getdef(), don't die when the section doesn't exist. X-Git-Tag: v1.6a1~288 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7f3cfd50fade7da7cda9a2168b22b8ce4defce28;p=thirdparty%2FPython%2Fcpython.git In getdef(), don't die when the section doesn't exist. --- diff --git a/Tools/idle/IdleConf.py b/Tools/idle/IdleConf.py index df5d9f83116d..807f183a3bd9 100644 --- a/Tools/idle/IdleConf.py +++ b/Tools/idle/IdleConf.py @@ -2,7 +2,7 @@ import os import sys -from ConfigParser import ConfigParser, NoOptionError +from ConfigParser import ConfigParser, NoOptionError, NoSectionError class IdleConfParser(ConfigParser): @@ -26,7 +26,7 @@ class IdleConfParser(ConfigParser): """Get an option value for given section or return default""" try: return self.get(sec, options, raw, vars) - except NoOptionError: + except (NoSectionError, NoOptionError): return default def getsection(self, section):