From bc2bb62032d33bffe950566f557119d46a4a9fdc Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Dec 07 2017 19:55:37 +0000 Subject: avoid unnecessary file opening --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 12b4096..9adebc9 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -6255,9 +6255,9 @@ def import_archive_internal(filepath, buildinfo, type, typeInfo, buildroot_id=No filename = koji.fixEncoding(os.path.basename(filepath)) archiveinfo['filename'] = filename archiveinfo['size'] = os.path.getsize(filepath) - archivefp = open(filepath) # trust values computed on hub (CG_Importer.prep_outputs) if not fileinfo or not getattr(fileinfo, 'hub.checked_md5'): + archivefp = open(filepath) m = md5_constructor() while True: contents = archivefp.read(8192)