[Idle-dev] CVS: idle IdleConf.py,1.2,1.3

Kurt B. Kaiser kbk@users.sourceforge.net
Fri, 13 Jul 2001 10:38:10 -0700


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv30180

Modified Files:
	IdleConf.py 
Log Message:
py-cvs-rel2_1 (Rev 1.6) merge - whitespace normalization


Index: IdleConf.py
===================================================================
RCS file: /cvsroot/idlefork/idle/IdleConf.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** IdleConf.py	2001/07/04 03:15:10	1.2
--- IdleConf.py	2001/07/13 17:38:08	1.3
***************
*** 11,15 ****
      for section in ('EditorWindow', 'Colors'):
          builtin_sections[section] = section
!     
      def getcolor(self, sec, name):
          """Return a dictionary with foreground and background colors
--- 11,15 ----
      for section in ('EditorWindow', 'Colors'):
          builtin_sections[section] = section
! 
      def getcolor(self, sec, name):
          """Return a dictionary with foreground and background colors
***************
*** 18,23 ****
          a tag_config call.
          """
! 	fore = self.getdef(sec, name + "-foreground")
! 	back = self.getdef(sec, name + "-background")
          return {"foreground": fore,
                  "background": back}
--- 18,23 ----
          a tag_config call.
          """
!         fore = self.getdef(sec, name + "-foreground")
!         back = self.getdef(sec, name + "-background")
          return {"foreground": fore,
                  "background": back}
***************
*** 25,32 ****
      def getdef(self, sec, options, raw=0, vars=None, default=None):
          """Get an option value for given section or return default"""
! 	try:
              return self.get(sec, options, raw, vars)
! 	except (NoSectionError, NoOptionError):
! 	    return default
  
      def getsection(self, section):
--- 25,32 ----
      def getdef(self, sec, options, raw=0, vars=None, default=None):
          """Get an option value for given section or return default"""
!         try:
              return self.get(sec, options, raw, vars)
!         except (NoSectionError, NoOptionError):
!             return default
  
      def getsection(self, section):
***************
*** 38,45 ****
          for sec in self.sections():
              if self.builtin_sections.has_key(sec):
! 		continue
! 	    # enable is a bool, but it may not be defined
! 	    if self.getdef(sec, 'enable') != '0':
! 		exts.append(sec)
          return exts
  
--- 38,45 ----
          for sec in self.sections():
              if self.builtin_sections.has_key(sec):
!                 continue
!             # enable is a bool, but it may not be defined
!             if self.getdef(sec, 'enable') != '0':
!                 exts.append(sec)
          return exts
  
***************
*** 70,77 ****
      def getint(self, option):
          return self.config.getint(self.section, option)
!     
      def getfloat(self, option):
          return self.config.getint(self.section, option)
!     
      def getboolean(self, option):
          return self.config.getint(self.section, option)
--- 70,77 ----
      def getint(self, option):
          return self.config.getint(self.section, option)
! 
      def getfloat(self, option):
          return self.config.getint(self.section, option)
! 
      def getboolean(self, option):
          return self.config.getint(self.section, option)
***************
*** 99,103 ****
      else:
          genplatfile = os.path.join(dir, "config-unix.txt")
!         
      platfile = os.path.join(dir, "config-%s.txt" % sys.platform)
  
--- 99,103 ----
      else:
          genplatfile = os.path.join(dir, "config-unix.txt")
! 
      platfile = os.path.join(dir, "config-%s.txt" % sys.platform)
  
***************
*** 111,113 ****
  
  idleconf = IdleConfParser()
- 
--- 111,112 ----