diff options
-rwxr-xr-x | importpkg.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/importpkg.py b/importpkg.py index 0798f13..01ec87a 100755 --- a/importpkg.py +++ b/importpkg.py @@ -57,9 +57,10 @@ class ProcessingFinished(Exception): pass class ImportpkgExtractor(DebExtractor): - def __init__(self, hash_functions, callback): + hash_functions = [sha512_nontrivial, gziphash, pnghash, gifhash] + + def __init__(self, callback): self.state = "start" - self.hash_functions = hash_functions self.callback = callback def handle_ar_member(self, name, filelike): @@ -99,7 +100,6 @@ def main(): parser.add_option("-H", "--hash", action="store", help="verify that stdin hash given sha256 hash") options, args = parser.parse_args() - hash_functions = [sha512_nontrivial, gziphash, pnghash, gifhash] try: stdin = sys.stdin.buffer except AttributeError: # python2 @@ -109,7 +109,7 @@ def main(): if options.hash: stdin = HashedStream(stdin, hashlib.sha256()) try: - ImportpkgExtractor(hash_functions, dumper.represent).process(stdin) + ImportpkgExtractor(dumper.represent).process(stdin) except ProcessingFinished: pass else: |