[Python-checkins] CVS: python/dist/src/Tools/idle IdleConf.py,1.3,1.4
Guido van Rossum
guido@cnri.reston.va.us
Mon, 6 Mar 2000 09:43:23 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Tools/idle
In directory eric:/projects/python/develop/guido/src/Tools/idle
Modified Files:
IdleConf.py
Log Message:
In getdef(), don't die when the section doesn't exist.
Index: IdleConf.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Tools/idle/IdleConf.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** IdleConf.py 2000年03月06日 14:14:02 1.3
--- IdleConf.py 2000年03月06日 14:43:20 1.4
***************
*** 3,7 ****
import os
import sys
! from ConfigParser import ConfigParser, NoOptionError
class IdleConfParser(ConfigParser):
--- 3,7 ----
import os
import sys
! from ConfigParser import ConfigParser, NoOptionError, NoSectionError
class IdleConfParser(ConfigParser):
***************
*** 27,31 ****
try:
return self.get(sec, options, raw, vars)
! except NoOptionError:
return default
--- 27,31 ----
try:
return self.get(sec, options, raw, vars)
! except (NoSectionError, NoOptionError):
return default