Merge pull request #8104 from AdmiralNemo/patch-1

Correct regex in is_keyid
This commit is contained in:
James Cammarata 2014-07-11 14:30:35 -05:00
commit 519f1ca488

View file

@ -156,7 +156,7 @@ class RpmKey:
def is_keyid(self, keystr): def is_keyid(self, keystr):
"""Verifies if a key, as provided by the user is a keyid""" """Verifies if a key, as provided by the user is a keyid"""
return re.match('(0x)?(0-9a-f){8}', keystr, flags=re.IGNORECASE) return re.match('(0x)?[0-9a-f]{8}', keystr, flags=re.IGNORECASE)
def execute_command(self, cmd): def execute_command(self, cmd):
if self.syslogging: if self.syslogging: