From bda5c0844b36bc6296019dc400213429b7deaf06 Mon Sep 17 00:00:00 2001 From: jxr8142 Date: Thu, 28 Sep 2017 10:12:54 -0400 Subject: [PATCH] Minor fixes/changes --- src/quote.py | 6 ++++-- src/ssh_manager.py | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/quote.py b/src/quote.py index 54bcfb4..c94bd83 100644 --- a/src/quote.py +++ b/src/quote.py @@ -38,19 +38,21 @@ def input_file(): quotes = [] with open(INPUT_FILE) as file: for line in file: - quotes.append(line.host.strip(' \t\n\r')) + quotes.append(line.strip(' \t\n\r')) + return quotes def main(): """ This function calls the welcome function, then it calls the cowsay function with a random quote. :return: None """ - print_welcome_message() quotes = input_file() print_cowsay_message(quotes[random.randint(0,(len(quotes) -1))]) + print_welcome_message() + """ Makes sure that other programs don't execute the main diff --git a/src/ssh_manager.py b/src/ssh_manager.py index 7fd6045..83e6d52 100644 --- a/src/ssh_manager.py +++ b/src/ssh_manager.py @@ -10,7 +10,10 @@ INPUT_FILE = "/home/jeff/scripts/servers.txt" Computer = collections.namedtuple("Computer", ('host', 'menue_id')) def main(): - + """ + This function inputs all the available hosts from a text file and prompts the user to connect to them + :return: + """ cmp = [] count = 1