From 811d40584d2e043f9445e312f06f1d77cfd94e1c Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Mar 20 2018 22:01:17 +0000 Subject: Backport PR#812: Fix AttributeError during archive import https://pagure.io/koji/pull-request/812 https://pagure.io/koji/issue/811 AttributeError: 'dict' object has no attribute 'hub.checked_md5' --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 28befb0..5fc0b14 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -6256,7 +6256,7 @@ def import_archive_internal(filepath, buildinfo, type, typeInfo, buildroot_id=No archiveinfo['filename'] = filename archiveinfo['size'] = os.path.getsize(filepath) # trust values computed on hub (CG_Importer.prep_outputs) - if not fileinfo or not getattr(fileinfo, 'hub.checked_md5'): + if not fileinfo or not fileinfo.get('hub.checked_md5'): archivefp = open(filepath) m = md5_constructor() while True: