fix suspicious except statements

The "except ValueError as UnicodeDecodeError" looks very suspicious.
Commit change except to catch both exceptions.

https://fedorahosted.org/freeipa/ticket/5718

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Martin Basti
2016-03-02 17:13:27 +01:00
committed by Tomas Babej
parent 3c519951c5
commit 2c8e100c73
2 changed files with 4 additions and 4 deletions

View File

@@ -1798,7 +1798,7 @@ def update_ssh_keys(server, hostname, ssh_dir, create_sshfp):
continue
try:
pubkey = SSHPublicKey(line)
except ValueError as UnicodeDecodeError:
except (ValueError, UnicodeDecodeError):
continue
root_logger.info("Adding SSH public key from %s", filename)
pubkeys.append(pubkey)