Mercurial > mozilla > hg > ProfileManager
changeset 45:6feee8d04db4
even more cleanup
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 May 2010 19:02:30 -0700 |
parents | 8eb997fd6e79 |
children | df1b2e48dddb |
files | profilemanager/manager.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/profilemanager/manager.py Thu May 06 19:01:10 2010 -0700 +++ b/profilemanager/manager.py Thu May 06 19:02:30 2010 -0700 @@ -88,7 +88,9 @@ clones the profile `source` and output to `dest` - add: add the profile to the profiles.ini file """ - source_path = self.path(source) # fs path of the `from` profile + + # filesystem path of the `from` profile + source_path = self.path(source) # dest: fs path to back up to relative = False @@ -104,9 +106,6 @@ dest = '%s.%s' % (self.hash(), dest) dest = os.path.join(self.profile_dir, dest) - - assert name not in self.profiles_dict(), 'Profile "%s" already in %s' % (name, self.profiles) - # update profiles.ini if add: self.add(name, dirname, relative) @@ -124,7 +123,7 @@ """ if dest is None: dest = '%s.%d.bak' % (profile, int(time.time())) - self.clone(profile, dest, hash=False) + self.clone(profile, dest, add=False) # TODO: add something like # `Backup=$(profile)s.$(datestamp)s.bak` # to self.profiles