Fix rpm_key absent. (#31045)

When keyid is 8 charactes long, drop_key function cuts everything
issuing an error: "package gpg-pubkey- is not installed"
pull/30616/head
Eduardo Suarez-Santana 7 years ago committed by Martin Krizek
parent 2e4dcc9dda
commit 4337b7a777

@ -183,7 +183,7 @@ class RpmKey(object):
def drop_key(self, keyid): def drop_key(self, keyid):
if not self.module.check_mode: if not self.module.check_mode:
self.execute_command([self.rpm, '--erase', '--allmatches', "gpg-pubkey-%s" % keyid[8:].lower()]) self.execute_command([self.rpm, '--erase', '--allmatches', "gpg-pubkey-%s" % keyid[-8:].lower()])
def main(): def main():

Loading…
Cancel
Save