monkeysphere: Fix error with no host keys

This commit is contained in:
Sunil Mohan Adapa 2016-02-12 15:54:03 +05:30
parent 608d19dc2b
commit 1f8ccb6c93
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971

View File

@ -53,9 +53,11 @@ def subcommand_host_show_keys(arguments):
"""Show host key fingerprints."""
try:
output = subprocess.check_output(
['monkeysphere-host', 'show-keys'] + arguments.key_ids)
['monkeysphere-host', 'show-keys'] + arguments.key_ids,
stderr=subprocess.DEVNULL)
except subprocess.CalledProcessError:
# no keys available
print(json.dumps({'keys': []}))
return
# parse output