Mercurial > mozilla > hg > ProfileManager
diff profilemanager/manager.py @ 73:1cfd259f74cf
finish dated backups, untested
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 07 May 2010 16:30:34 -0700 |
parents | 494ea3c2f578 |
children | b6bb59b79525 |
line wrap: on
line diff
--- a/profilemanager/manager.py Fri May 07 16:09:06 2010 -0700 +++ b/profilemanager/manager.py Fri May 07 16:30:34 2010 -0700 @@ -218,6 +218,7 @@ """ assert not (date and delete), 'date and delete cannot be used in conjunction' + orig_date = date # get the path to the profile path = self.path(profile) @@ -248,7 +249,10 @@ date = time.mktime(date.timetuple()) for backup in backups: - raise NotImplementedError + if backup[1] < date: + break + else: + raise NoBackupError("No backups for profile %s in %s earlier than %s" % (profile, self.profiles, orig_date)) else: if not backups: raise NoBackupError("No backups for profile %s in %s" % (profile, self.profiles))