comparison profilemanager/manager.py @ 37:76fc1a23182c

instantiate a parser
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 May 2010 17:52:06 -0700
parents a6222b71aab6
children 81500171fda8
comparison
equal deleted inserted replaced
36:a6222b71aab6 37:76fc1a23182c
74 def remove(self, name, delete=True): 74 def remove(self, name, delete=True):
75 """ 75 """
76 remove a profile from profiles.ini 76 remove a profile from profiles.ini
77 - delete: delete the profile directory as well 77 - delete: delete the profile directory as well
78 """ 78 """
79 section = self.section(name) 79 parser = self.parser()
80 section = self.section(name, parser)
80 if section is None: 81 if section is None:
81 raise ProfileNotFound('Profile %s not found in %s' % (profile, self.profiles)) 82 raise ProfileNotFound('Profile %s not found in %s' % (profile, self.profiles))
82 if delete: # remove the profile from disk 83 if delete: # remove the profile from disk
83 shutil.rmtree(self.path(name)) 84 shutil.rmtree(self.path(name))
84 parser.remove_section(section) 85 parser.remove_section(section)