Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #585 from gamechanger/tnt-no-known-hosts
Browse files Browse the repository at this point in the history
Create required known_hosts file if it does not exists
  • Loading branch information
thieman committed Sep 14, 2015
2 parents d51aa26 + fb14ac1 commit ee1e190
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dusty/systems/known_hosts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def _get_known_hosts_path():

def ensure_known_hosts(hosts):
known_hosts_path = _get_known_hosts_path()
if not os.path.exists(known_hosts_path):
open(known_hosts_path, 'a+').close()
modified = False
with open(known_hosts_path, 'r+') as f:
contents = f.read()
Expand Down

0 comments on commit ee1e190

Please sign in to comment.