Skip to content

Commit

Permalink
Fixed issue where single name could not be requested
Browse files Browse the repository at this point in the history
  • Loading branch information
ansengarvin committed Feb 20, 2022
1 parent 7dabe0f commit d211ed3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions getnames.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ def get_error_list(message):

if len(lines) > 0:
print("Received Request")
if lines[0].isnumeric() and int(lines[0]) > 1:
if lines[0].isnumeric() and int(lines[0]) > 0:
name_list = get_name_list(int(lines[0]), consonants, single_vowels, double_vowels)
else:
print("ERROR: Non-number requested.")
name_list = ["ERROR: Invalid Requested"]
name_list = ["ERROR: Invalid Number Requested"]

f = open('request.txt', 'w')
f.write("")
Expand Down
1 change: 1 addition & 0 deletions response.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
thethu

0 comments on commit d211ed3

Please sign in to comment.