Patch attached, read commit message for more info.
From 2346845810137b7a844747ad75ee6e626d45d84e Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Wed, 2 Mar 2016 17:13:27 +0100
Subject: [PATCH] fix suspicious except statement in update_ssh_key

The "except ValueError as UnicodeDecodeError" looks very suspicious.
Commit change except to catch both exceptions.
---
 client/ipa-client-install | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/ipa-client-install b/client/ipa-client-install
index 1e611244593b4db88beacfdeb47e92faae24132e..44ddeb956dfd6928317d50309aea42d8eb9e2de0 100755
--- a/client/ipa-client-install
+++ b/client/ipa-client-install
@@ -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)
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to