From d91d2290c488c500305c3f1b0bddab133712d42b Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Mar 04 2019 14:35:31 +0000 Subject: PR#1315: fix checksum validation in CG_Importer Merges #1315 https://pagure.io/koji/pull-request/1315 Fixes: #1314 https://pagure.io/koji/issue/1314 import-cg fails with python3 hub --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 4124344..c100da0 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -5843,7 +5843,7 @@ class CG_Importer(object): # XXX # until we change the way we handle checksums, we have to limit this to md5 raise koji.GenericError("Unsupported checksum type: %(checksum_type)s" % fileinfo) - with open(path) as fp: + with open(path, 'rb') as fp: m = md5_constructor() while True: contents = fp.read(8192)