Fix known_hosts.py to work on older versions of python
Merge pull request #7406 from specnazzz/fix-python24

Fix known_hosts.py to work on older versions of python