mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Only remove leading '0x' from key ids, not all 0s
This commit is contained in:
parent
e0fbaea566
commit
414a5b4eab
1 changed files with 2 additions and 1 deletions
|
@ -191,7 +191,8 @@ def main():
|
||||||
if key_id:
|
if key_id:
|
||||||
try:
|
try:
|
||||||
_ = int(key_id, 16)
|
_ = int(key_id, 16)
|
||||||
key_id = key_id.lstrip('0x')
|
if key_id.startswith('0x'):
|
||||||
|
key_id = key_id[2:]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
module.fail_json("Invalid key_id")
|
module.fail_json("Invalid key_id")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue