# HG changeset patch # User Jeff Hammel # Date 1273258953 25200 # Node ID ee2777913a9ecb2774bd516ac1f638cbc1314d5b # Parent ce6a101fb2390433a9d7ec3273e85eb33b224059 check the correct way to see if the option is there diff -r ce6a101fb239 -r ee2777913a9e profilemanager/manager.py --- a/profilemanager/manager.py Fri May 07 11:55:15 2010 -0700 +++ b/profilemanager/manager.py Fri May 07 12:02:33 2010 -0700 @@ -9,6 +9,7 @@ import ConfigParser from random import Random from utils import format_tabular +#from ConfigParser import NoOptionError from ConfigParser import SafeConfigParser as ConfigParser # Changes to profiles.ini: @@ -313,10 +314,9 @@ for section in parser.sections(): if section == 'General': continue - try: - name = parser.get(section, 'name') - except ConfigParser.NoOptionError: + if not parser.has_option(section, 'Name'): continue + name = parser.get_option(section, 'Name') retval[name] = self.profile_dict(name) return retval