comparison profilemanager/manager.py @ 61:24782e4c70ca

now that we are case sensitive, correct case for getting options
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 May 2010 12:07:11 -0700
parents ee2777913a9e
children e29fed5097c3
comparison
equal deleted inserted replaced
60:496ff7dc26ee 61:24782e4c70ca
287 if not found 287 if not found
288 """ 288 """
289 if parser is None: 289 if parser is None:
290 parser = self.parser() 290 parser = self.parser()
291 for section in parser.sections(): 291 for section in parser.sections():
292 if not parser.has_option(section, 'name'): 292 if not parser.has_option(section, 'Name'):
293 continue # not a profile 293 continue # not a profile
294 if parser.get(section, 'name') == profile: 294 if parser.get(section, 'Name') == profile:
295 return section 295 return section
296 296
297 def profile_dict(self, profile): 297 def profile_dict(self, profile):
298 """ 298 """
299 return option dictionary for a single profile 299 return option dictionary for a single profile
314 for section in parser.sections(): 314 for section in parser.sections():
315 if section == 'General': 315 if section == 'General':
316 continue 316 continue
317 if not parser.has_option(section, 'Name'): 317 if not parser.has_option(section, 'Name'):
318 continue 318 continue
319 name = parser.get_option(section, 'Name') 319 name = parser.get(section, 'Name')
320 retval[name] = self.profile_dict(name) 320 retval[name] = self.profile_dict(name)
321 return retval 321 return retval
322 322
323 def hash(self): 323 def hash(self):
324 """ 324 """