Skip to content

Commit 548372d

Browse files
committed
handle else while saving response data
1 parent ba4608f commit 548372d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arguments/api_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ def fetch_input_url(cls):
4747
@classmethod
4848
def save_response_data(cls,response_data):
4949
store_data = input('Store response data? (Y/N): ')
50-
if(store_data == 'Y' or store_data == 'y'):
50+
if(store_data.lower() == 'y'):
5151
with open('response_data.json', 'w') as jsonFile:
5252
json.dump(response_data, jsonFile, indent=4)
5353
print("Response data stored in response_data.json")
5454
else:
55-
print(f"You have entered {store_data}, please enter 'Y' or 'y' to store the output")
55+
print(f"You have entered {store_data}, So the response is not saved")
5656

5757
# formats the response data and prints it in json on console
5858
@classmethod

0 commit comments

Comments
 (0)