From bc2bb62032d33bffe950566f557119d46a4a9fdc Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Tue, 5 Dec 2017 23:54:25 -0500 Subject: [PATCH] avoid unnecessary file opening --- hub/kojihub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/kojihub.py b/hub/kojihub.py index 12b40963..9adebc96 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)