# HG changeset patch
# User Jeff Hammel <jhammel@mozilla.com>
# Date 1273174947 25200
# Node ID 4a1815f8d14687abb15c53dd28a0f058ffa055af
# Parent  8e651dd8e9ad200d98de105ae2767bbadfb1ee04
* stub adding new profile to configuration
* stub tests; have one mysterious failure with doctest :(

diff -r 8e651dd8e9ad -r 4a1815f8d146 profilemanager/manager.py
--- a/profilemanager/manager.py	Thu May 06 12:02:14 2010 -0700
+++ b/profilemanager/manager.py	Thu May 06 12:42:27 2010 -0700
@@ -51,9 +51,20 @@
         # TODO: (optionally) pre-populate the directory a la FF
         os.mkdir(dirname)
 
+        # update profiles.ini
+        parser = ConfigParser()
+        parser.read(self.profiles)
+        
         # return the directory name
         return dirname
 
+    def remove(self, name, delete=True):
+        """
+        remove a profile from profiles.ini
+        - delete: delete the profile as well
+        """
+        raise NotImplementedError
+
     def list(self, directories=False):
         """
         lists the profiles available in the config file
diff -r 8e651dd8e9ad -r 4a1815f8d146 profilemanager/tests/test_profilemanager.txt
--- a/profilemanager/tests/test_profilemanager.txt	Thu May 06 12:02:14 2010 -0700
+++ b/profilemanager/tests/test_profilemanager.txt	Thu May 06 12:42:27 2010 -0700
@@ -18,4 +18,10 @@
 
 Create a new profile:
 
-    >>> manager.new('testprofile')
+    >>> profiledir = manager.new('testprofile')
+    >>> print profiledir
+    ...profilemanager/tests/profiles/...testprofile
+
+Cleanup:
+
+    >>> manager.remove('testprofile')