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

Commit

Permalink
Merge pull request #5 from nunofernandes/master
Browse files Browse the repository at this point in the history
Support running local-cname on containers
  • Loading branch information
hjacobs committed Oct 3, 2020
2 parents fc1a59a + 7167a97 commit 559c5a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion local_cname/cli.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import socket
import time
import os
from pathlib import Path

from clickclick import Action, info
Expand Down Expand Up @@ -49,4 +50,9 @@ def main():
# ignore, do not print stacktrace
pass
finally:
backup_file.rename(hosts_file)
try:
backup_file.rename(hosts_file)
except OSError:
with hosts_file.open('w') as fd:
fd.write(old_contents)
os.remove(backup_file)
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
click>=7
clickclick>=1.2
zipp>=1
PyYAML>=5

0 comments on commit 559c5a4

Please sign in to comment.