diff options
author | Guido van Rossum <guido@python.org> | 2000-03-06 14:43:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-03-06 14:43:20 (GMT) |
commit | 7f3cfd50fade7da7cda9a2168b22b8ce4defce28 (patch) | |
tree | 13cab20cd9d879e1928facff25e33408aef92dff /Tools | |
parent | 074d6e1f563818d2b56b84a31945c161c538c5c6 (diff) | |
download | cpython-7f3cfd50fade7da7cda9a2168b22b8ce4defce28.zip cpython-7f3cfd50fade7da7cda9a2168b22b8ce4defce28.tar.gz cpython-7f3cfd50fade7da7cda9a2168b22b8ce4defce28.tar.bz2 |
In getdef(), don't die when the section doesn't exist.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/idle/IdleConf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/idle/IdleConf.py b/Tools/idle/IdleConf.py index df5d9f8..807f183 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): |