Skip to content

Commit 9a8a672

Browse files
atucomEkultek
authored andcommitted
Changed the host_path check to not override itself (#105)
The try except block was overriding the path var with the contents of the folder causing errors further down. Changed to just check for proper opening of the file.
1 parent 87c0cb0 commit 9a8a672

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/term/terminal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ def __init__(self, tokens):
1919
self.tokens = tokens
2020
self.usage_path = lib.settings.USAGE_AND_LEGAL_PATH
2121
self.sep = "-" * 30
22+
self.host_path = lib.settings.HOST_FILE
2223
try:
23-
self.host_path = open(lib.settings.HOST_FILE).readlines()
24+
open(lib.settings.HOST_FILE).readlines()
2425
except IOError:
2526
lib.output.warning("no hosts file present, you need to gather some hosts")
2627
self.host_path = lib.settings.HOST_FILE

0 commit comments

Comments
 (0)