commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue-common/src/apps GConfig.py


From: Jan Ischebeck
Subject: gnue-common/src/apps GConfig.py
Date: Thu, 04 Sep 2003 17:03:10 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue-common
Branch:         
Changes by:     Jan Ischebeck <address@hidden>  03/09/04 17:03:10

Modified files:
        src/apps       : GConfig.py 

Log message:
        make config file reading a bit more verbose (debug level 1)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-common/src/apps/GConfig.py.diff?tr1=1.34&tr2=1.35&r1=text&r2=text

Patches:
Index: gnue-common/src/apps/GConfig.py
diff -c gnue-common/src/apps/GConfig.py:1.34 
gnue-common/src/apps/GConfig.py:1.35
*** gnue-common/src/apps/GConfig.py:1.34        Sat Mar 22 15:43:54 2003
--- gnue-common/src/apps/GConfig.py     Thu Sep  4 17:03:09 2003
***************
*** 68,74 ****
    # 
    def loadApplicationConfig(self, configFilename="gnue.conf", 
homeConfigDir=".gnue", section="DEFAULT", defaults = None):
  
!     GDebug.printMesg(1,'Reading configuration info from %s section %s' 
%(configFilename,section))
  
      #
      # Create parser and populate it if it doesn't exist
--- 68,74 ----
    # 
    def loadApplicationConfig(self, configFilename="gnue.conf", 
homeConfigDir=".gnue", section="DEFAULT", defaults = None):
  
!     GDebug.printMesg(1,'Reading configuration info from %s section %s' % 
(configFilename, section))
  
      #
      # Create parser and populate it if it doesn't exist
***************
*** 101,106 ****
--- 101,108 ----
        #
        try:
          parser.read(fileLocations)
+         GDebug.printMesg(1,'Configuration files were read in this order:  %s' 
% \
+                          (fileLocations) )
        except DuplicateSectionError:
          raise InvalidFormatError, _('The file has duplicate source 
definitions.')
        except MissingSectionHeaderError:
***************
*** 147,153 ****
    def gConfig(self, varName, configFilename=None, section=None):
      if not configFilename: configFilename = self._defaultConfigFilename
      if not section: section = self._defaultSection
- 
      try:
        return self._loadedConfigs[configFilename].get(section,varName)
      except NoSectionError:
--- 149,154 ----
***************
*** 164,170 ****
    def gConfigDict(self, configFilename=None, section=None):
      if not configFilename: configFilename = self._defaultConfigFilename
      if not section:      section = self._defaultSection
! 
      options = {}
      for option in self._loadedConfigs[configFilename].options(section):
          options[option] =  
self._loadedConfigs[configFilename].get(section,string.lower(option))
--- 165,171 ----
    def gConfigDict(self, configFilename=None, section=None):
      if not configFilename: configFilename = self._defaultConfigFilename
      if not section:      section = self._defaultSection
!  
      options = {}
      for option in self._loadedConfigs[configFilename].options(section):
          options[option] =  
self._loadedConfigs[configFilename].get(section,string.lower(option))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]