Skip to content

Commit

Permalink
don't hide exception
Browse files Browse the repository at this point in the history
Don't wrap the original exception in a new one.
  • Loading branch information
goneri committed May 13, 2019
1 parent 05ad721 commit c15528b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion virt_lightning/virt_lightning.py
Expand Up @@ -494,12 +494,13 @@ def load_ssh_key_file(self, ssh_key_file):
with open(os.path.expanduser(ssh_key_file), "r") as fd:
self.ssh_key = fd.read()
except IOError:
raise Exception(
logger.error(
(
"Can not read {filename}. If you don't have any SSH key, "
"please follow the steps describe here:\n {doc_url}"
).format(filename=ssh_key_file, doc_url=doc_url)
)
raise

self.cloud_init["ssh_authorized_keys"] = [self.ssh_key]
if "users" in self.cloud_init:
Expand Down

0 comments on commit c15528b

Please sign in to comment.