From 80c575f9dc7080987201d0713ff4996337233368 Mon Sep 17 00:00:00 2001 From: atucom Date: Mon, 26 Mar 2018 09:28:56 -0500 Subject: [PATCH] Changed the host_path check to not override itself 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. --- lib/term/terminal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/term/terminal.py b/lib/term/terminal.py index 5287e5d..b3c5e40 100644 --- a/lib/term/terminal.py +++ b/lib/term/terminal.py @@ -19,8 +19,9 @@ def __init__(self, tokens): self.tokens = tokens self.usage_path = lib.settings.USAGE_AND_LEGAL_PATH self.sep = "-" * 30 + self.host_path = lib.settings.HOST_FILE try: - self.host_path = open(lib.settings.HOST_FILE).readlines() + open(lib.settings.HOST_FILE).readlines() except IOError: lib.output.warning("no hosts file present, you need to gather some hosts") self.host_path = lib.settings.HOST_FILE