diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-12-06 15:57:07 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-12-06 16:40:16 +0100 |
commit | 011235d20d03589540c521a5eb83ea6c0d6105e7 (patch) | |
tree | c061077371d6c13066f57479fbd7aa7aa5cbe480 | |
parent | 20f13ccae98d2cd1be3d6051ac8c2f6f002166d1 (diff) | |
download | obnam-011235d20d03589540c521a5eb83ea6c0d6105e7.tar.gz |
Only check whole-file MD5 if allowed by repository
-rw-r--r-- | obnamlib/plugins/fsck_plugin.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/obnamlib/plugins/fsck_plugin.py b/obnamlib/plugins/fsck_plugin.py index 96226237..d8e15cf7 100644 --- a/obnamlib/plugins/fsck_plugin.py +++ b/obnamlib/plugins/fsck_plugin.py @@ -80,10 +80,11 @@ class CheckFile(WorkItem): for chunkid in chunkids: yield CheckChunk(chunkid, checksummer) if not self.settings['fsck-skip-checksums']: - md5 = self.repo.get_file_key( - self.genid, self.filename, obnamlib.REPO_FILE_MD5) - yield CheckFileChecksum( - self.name, md5, chunkids, checksummer) + if obnamlib.REPO_FILE_MD5 in self.repo.get_allowed_file_keys(): + md5 = self.repo.get_file_key( + self.genid, self.filename, obnamlib.REPO_FILE_MD5) + yield CheckFileChecksum( + self.name, md5, chunkids, checksummer) class CheckDirectory(WorkItem): |