1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fixing typos in is_keyid function definition and usage

Fixes #4068
This commit is contained in:
James Cammarata 2013-09-09 17:26:44 -05:00
parent b3c0e3e45e
commit 808d9596b2

View file

@ -86,7 +86,7 @@ class RpmKey:
keyfile = self.fetch_key(key) keyfile = self.fetch_key(key)
keyid = self.getkeyid(keyfile) keyid = self.getkeyid(keyfile)
should_cleanup_keyfile = True should_cleanup_keyfile = True
elif is_keyid(key): elif self.is_keyid(key):
keyid = key keyid = key
elif os.path.isfile(key): elif os.path.isfile(key):
keyfile = key keyfile = key
@ -147,7 +147,7 @@ class RpmKey:
return keyid return keyid
self.json_fail(msg="Unexpected gpg output") self.json_fail(msg="Unexpected gpg output")
def is_keyid(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)