From d211ed30fad0115683224c6b4f1eaa40b4fab4d0 Mon Sep 17 00:00:00 2001 From: ansengarvin <45224464+ansengarvin@users.noreply.github.com> Date: Sun, 20 Feb 2022 15:39:06 -0800 Subject: [PATCH] Fixed issue where single name could not be requested --- getnames.py | 4 ++-- response.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/getnames.py b/getnames.py index 1fd7356..5c99906 100644 --- a/getnames.py +++ b/getnames.py @@ -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("") diff --git a/response.txt b/response.txt index e69de29..7ff34b5 100644 --- a/response.txt +++ b/response.txt @@ -0,0 +1 @@ +thethu \ No newline at end of file