]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Strip ssh-keyscan output before logging it
authorZack Cerza <zack@redhat.com>
Thu, 12 Feb 2015 21:54:32 +0000 (14:54 -0700)
committerZack Cerza <zack@redhat.com>
Fri, 3 Apr 2015 03:42:30 +0000 (21:42 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/lock.py

index f1e067683549a1e93ca10b226dfa9a7fccb9ed9f..49ed4863f0abf0e627ae6f3f32248e720a57d9fa 100644 (file)
@@ -617,7 +617,8 @@ def ssh_keyscan(hostnames):
 
     keys_dict = dict()
     for line in p.stderr.readlines():
-        if not line.startswith('#'):
+        line = line.strip()
+        if line and not line.startswith('#'):
             log.error(line)
     for line in p.stdout.readlines():
         host, key = line.strip().split(' ', 1)