Skip to content

Commit

Permalink
Revert "Revert "Issue #393""
Browse files Browse the repository at this point in the history
This reverts commit bc7fa76.
  • Loading branch information
elg committed Nov 4, 2019
1 parent bc7fa76 commit fe77396
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions passhport/passhport
Original file line number Diff line number Diff line change
Expand Up @@ -402,15 +402,20 @@ if __name__ == '__main__':
# Let the use chose his server
try:
choice = input("Type the number, name or hostname of the " + \
"server you want to connect to: ").rstrip().casefold()
"server you want to connect to: ").rstrip().casefold()
except EOFError:
print("\nExiting at your own sweet will.")
sys.exit(0)

valid_input = False

# Try to connect the user to the server he choosed or ask to re-type
while not checkandconnect(indexed_target_list, choice, username, originalcmd):
while not checkandconnect(indexed_target_list, choice,
username, originalcmd):
print("You didn't type correctly, please try again.\n")
choice = input("Type the number, name or hostname of the " + \
"server you want to connect to: ").rstrip().casefold()
try:
choice = input("Type the number, name or hostname of the " + \
"server you want to connect to: ").rstrip().casefold()
except EOFError:
print("\nExiting at your own sweet will.")
sys.exit(0)

0 comments on commit fe77396

Please sign in to comment.