From da3b769e1a7d1ae7c4b35db8d8d44a3ce7f662bf Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Fri, 26 May 2017 11:41:34 -0400 Subject: [PATCH] Fix base64 encoding of server key Change-Id: Ifc5d39f5a3d4f175ea149bcabbfa8c6c67b4df0b --- nodepool/nodeutils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nodepool/nodeutils.py b/nodepool/nodeutils.py index 335c0af88..4810d6951 100644 --- a/nodepool/nodeutils.py +++ b/nodepool/nodeutils.py @@ -16,7 +16,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import base64 import errno import ipaddress import time @@ -94,9 +93,6 @@ def keyscan(ip, timeout=60): # Paramiko, at this time, seems to return only the ssh-rsa key, so # only the single key is placed into the list. if key: - keys.append( - "%s %s" % (key.get_name(), - base64.encodestring(str(key)).replace('\n', '')) - ) + keys.append("%s %s" % (key.get_name(), key.get_base64())) return keys