changeset 57:3b4b87faa2a8

* make options case-sensitive * pass the child as an instance to the parent ctor for ProfileNotFound
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 May 2010 11:52:06 -0700
parents 2dde7dcc899e
children ce6a101fb239
files profilemanager/manager.py profilemanager/tests/profiles/profiles.ini
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/profilemanager/manager.py	Fri May 07 11:37:41 2010 -0700
+++ b/profilemanager/manager.py	Fri May 07 11:52:06 2010 -0700
@@ -23,7 +23,8 @@
     def __init__(self, profile, config):
         self.profile = profile
         self.config = config
-        Exception.__init__('Profile %s not found in %s' % (profile, config))
+        Exception.__init__(self,
+                           'Profile %s not found in %s' % (profile, config))
 
 class ProfileManager(object):
 
@@ -150,7 +151,6 @@
 
         # copy the files
         self.clone(profile, dest, add=False)
-
         
         # add backup entry to profiles.ini (colon separated):
         # `Backup=$(profile)s.$(datestamp)s.bak`
@@ -271,6 +271,7 @@
         return a ConfigParser instance appropriate to profiles.ini
         """
         parser = ConfigParser()
+        parser.optionxform = str
         parser.read(self.profiles)
         return parser
 
@@ -319,7 +320,6 @@
             retval[name] = self.profile_dict(name)
         return retval
 
-
     def hash(self):
         """
         generate a random hash for a new profile
--- a/profilemanager/tests/profiles/profiles.ini	Fri May 07 11:37:41 2010 -0700
+++ b/profilemanager/tests/profiles/profiles.ini	Fri May 07 11:52:06 2010 -0700
@@ -1,1 +1,8 @@
+[Profile0]
+Default = 1
+Path = 2k58wvyt.foo
+IsRelative = 1
+Name = foo
+
 [General]
+