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

Merge pull request #4727 from leth/apt-key-leading-zeros

Only remove leading '0x' from apt key ids, not all 0s
This commit is contained in:
Michael DeHaan 2013-10-30 17:16:20 -07:00
commit e35c54b5aa

View file

@ -191,7 +191,8 @@ def main():
if key_id:
try:
_ = int(key_id, 16)
key_id = key_id.lstrip('0x')
if key_id.startswith('0x'):
key_id = key_id[2:]
except ValueError:
module.fail_json("Invalid key_id")