Commit 46d1df80 authored by Nicolas Wavrant's avatar Nicolas Wavrant

recipe/dropbear: reading from known_host shouldn't raise error on empty line

parent 94e8d370
......@@ -37,7 +37,7 @@ class KnownHostsFile(dict):
if os.path.exists(self._filename):
with open(self._filename, 'r') as keyfile:
for line in keyfile:
host, key = [column.strip() for column in line.split(' ', 1)]
host, key = [column.strip() for column in line.split(' ', 1) if line != ""]
self[host] = key
def _dump(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment