diff options
author | Martin Sivak <msivak@redhat.com> | 2008-03-25 17:46:02 +0100 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-03-25 17:46:02 +0100 |
commit | cc4fd33a0493f461680d86bbfe802bb4d4f6b37b (patch) | |
tree | 6d13ebccc5ce980b7b52e45898b3604a16e74cc3 /pyfirstaidkit/utils | |
parent | 593e8f6875021d606f91c7699618f4741751f298 (diff) | |
download | firstaidkit-cc4fd33a0493f461680d86bbfe802bb4d4f6b37b.tar.gz firstaidkit-cc4fd33a0493f461680d86bbfe802bb4d4f6b37b.tar.xz firstaidkit-cc4fd33a0493f461680d86bbfe802bb4d4f6b37b.zip |
And use different method for name generation in backup
Diffstat (limited to 'pyfirstaidkit/utils')
-rw-r--r-- | pyfirstaidkit/utils/backup.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pyfirstaidkit/utils/backup.py b/pyfirstaidkit/utils/backup.py index 43facf8..31e2f07 100644 --- a/pyfirstaidkit/utils/backup.py +++ b/pyfirstaidkit/utils/backup.py @@ -21,6 +21,7 @@ from errors import NotImplemented import os import shutil +import hashlib class BackupException(Exception): pass @@ -79,7 +80,7 @@ class FileBackupStore(BackupStoreIterface): if self._data.has_key(name): raise BackupException("Named backup %s already in the backup store %s!" % (name,self._id)) - stored = name.encode("md5")+"_"+name.encode("sha1") + stored = hashlib.sha224(name).hexdigest() if os.path.isdir(path): shutil.copytree(path, os.path.join(self._path, stored), symlinks = True) |