Commit 28603c92 authored by Antoine Catton's avatar Antoine Catton

Avoid having None in known_hosts file.

parent d183095e
......@@ -43,6 +43,7 @@ class KnownHostsFile(dict):
def _dump(self):
with open(self._filename, 'w') as keyfile:
for key, value in self.items():
if key is not None and value is not None:
keyfile.write('%(host)s %(key)s\n' % {'host': key,
'key': value})
......
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