Mercurial > mozilla > hg > ProfileManager
diff profilemanager/manager.py @ 18:8e651dd8e9ad
fix two things about hash() usage
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 May 2010 12:02:14 -0700 |
parents | c80d44e5ca41 |
children | 4a1815f8d146 |
line wrap: on
line diff
--- a/profilemanager/manager.py Thu May 06 11:47:33 2010 -0700 +++ b/profilemanager/manager.py Thu May 06 12:02:14 2010 -0700 @@ -42,7 +42,7 @@ # path to the profile directory dirname = name if hash: - dirname = '%s.%s' % self.hash() + dirname = '%s.%s' % (self.hash(), dirname) if not directory: directory = self.profile_dir dirname = os.path.join(directory, dirname) @@ -183,6 +183,6 @@ generate a random hash for a new profile """ population = string.lowercase + string.digits - return Random().sample(population, 8) + return ''.join(Random().sample(population, 8))