You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koji/796.patch

29 lines
1.0 KiB

From e45c909235825f22e2ac7da63a4d6454399224e3 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <patrick@puiterwijk.org>
Date: Feb 20 2018 09:10:11 +0000
Subject: Fix comparison with Enum value
The CHECKSUM_TYPES[...] call returns the index in the Enum field, not a string,
which meant that the comparison would never work.
Reported-by: Clement Verna <cverna@tutanota.com>
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
---
diff --git a/hub/kojihub.py b/hub/kojihub.py
index eb9b67d..f910595 100644
--- a/hub/kojihub.py
+++ b/hub/kojihub.py
@@ -5581,7 +5581,7 @@ class CG_Importer(object):
(filesize, fileinfo['filename'], fileinfo['filesize']))
# checksum
- if koji.CHECKSUM_TYPES[fileinfo['checksum_type']] != 'md5':
+ if fileinfo['checksum_type'] != 'md5':
# 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)