Changeset 666 for trunk/jobmond
- Timestamp:
- 09/04/12 15:59:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jobmond/jobmond.py
r665 r666 25 25 import xdrlib, socket, syslog, xml, xml.sax 26 26 from types import * 27 from glob import glob 27 28 28 29 VERSION='TRUNK+SVN' … … 97 98 def __init__( self, config_file ): 98 99 99 self.config_file = config_file 100 self.config_file = config_file 101 self.include_parsers = [ ] 100 102 101 103 if not os.path.exists( self.config_file ): … … 103 105 debug_msg( 0, "FATAL ERROR: gmond config '" + self.config_file + "' not found!" ) 104 106 sys.exit( 1 ) 107 108 def removeHaakjes( self, value ): 109 110 clean_value = value 111 clean_value = clean_value.replace( "(", "" ) 112 clean_value = clean_value.replace( ")", "" ) 113 clean_value = clean_value.strip() 114 115 return clean_value 105 116 106 117 def removeQuotes( self, value ): … … 156 167 157 168 continue 169 170 if line.find( 'include' ) != -1: 171 172 line = line.removeHaakjes() 173 174 include_line = line.strip(' ')[1:] 175 176 for include_file in glob( include_line ): 177 178 include_parser = GangliaConfigParser( include_file ) 179 include_getval = include_parser.getStr( section, valname ) 180 181 if include_getval: 182 183 value = include_getval 184 #break ? FIXME value can be overriden by other includes: perhaps users problem 185 186 del include_parser 158 187 159 188 if line.find( section ) != -1:
Note: See TracChangeset
for help on using the changeset viewer.