Do key validation only when key is provided

key_id is optional, the previous code didn't handle the case of key_id
not specified
reviewable/pr18780/r1
Maykel Moya 11 years ago
parent 6dedb68bde
commit a96f75c396

@ -188,6 +188,7 @@ def main():
state = module.params['state']
changed = False
if key_id:
try:
_ = int(key_id, 16)
key_id = key_id.lstrip('0x')

Loading…
Cancel
Save