Browse Source

Minor fixes/changes

pull/1/head
Jeffery Russell 6 years ago
parent
commit
bda5c0844b
2 changed files with 8 additions and 3 deletions
  1. +4
    -2
      src/quote.py
  2. +4
    -1
      src/ssh_manager.py

+ 4
- 2
src/quote.py View File

@ -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

+ 4
- 1
src/ssh_manager.py View File

@ -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

Loading…
Cancel
Save