# HG changeset patch # User Jeff Hammel # Date 1273189881 25200 # Node ID 105ecbac092899f2ae7578b140c9443b53ba249a # Parent d4f0c1c4d0ebc015764fe59c475c750eb91c63e8 fix some test failures diff -r d4f0c1c4d0eb -r 105ecbac0928 profilemanager/manager.py --- a/profilemanager/manager.py Thu May 06 16:48:43 2010 -0700 +++ b/profilemanager/manager.py Thu May 06 16:51:21 2010 -0700 @@ -66,7 +66,7 @@ parser.set(section, 'Path', relative and dirname or path) if len(parser.sections()) == 1: parser.set(section, 'Default', '1') - parser.write(self.profiles) + parser.write(file(self.profiles, 'w')) # return the directory name return dirname @@ -82,7 +82,7 @@ if delete: # remove the profile from disk shutil.rmtree(self.path(name)) parser.remove_section(section) - parser.write(self.profiles) + parser.write(file(self.profiles, 'w')) def list(self, directories=False): """ @@ -190,7 +190,7 @@ if not found """ if parser is None: - self.parser() + parser = self.parser() for section in parser.section(): if not parser.has_option(section, 'name'): continue # not a profile