From f2174ad7e7fb02fa3ba1093109f7f0c875934ed4 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 11 Jun 2011 20:01:27 +0100 Subject: Check that all checksums are OK. --- summain | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'summain') diff --git a/summain b/summain index ac9d7c9..ff9e225 100755 --- a/summain +++ b/summain @@ -54,6 +54,12 @@ class Summain(cliapp.Application): pn = summainlib.SamePath() checksums = [x.upper() for x in self.settings['checksum'] or ['SHA1']] + o = summainlib.FilesystemObject('.', nn, pn, exclude, checksums) + for checksum in checksums: + try: + o[checksum] + except KeyError: + raise cliapp.AppException('Unknown checksum %s' % checksum) for root in args: for filename in self.files(root): o = summainlib.FilesystemObject(filename, nn, pn, exclude, -- cgit v1.2.1