changeset 29:105ecbac0928

fix some test failures
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 May 2010 16:51:21 -0700
parents d4f0c1c4d0eb
children d9886a7e8df7
files profilemanager/manager.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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