diff --git a/src/main-export-known-hosts.py b/src/main-export-known-hosts.py index 63288b9..6cda64c 100644 --- a/src/main-export-known-hosts.py +++ b/src/main-export-known-hosts.py @@ -48,8 +48,8 @@ def main(): try: homedir = os.environ['HOME'] - except KeyError: - raise KeyError('$HOME is not set') + except KeyError as err: + raise KeyError('$HOME is not set') from err # The input file # Default to ~/.ssh/known_hosts