Skip to content

Commit 8992886

Browse files
author
honeybhardwaj
committed
modified file to remove bug of empty inputs
1 parent b304f48 commit 8992886

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/arguments/search.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ def __init__(self, message):
1414
self.message = message
1515

1616
def prompt(self):
17-
print(colored(f"{self.message} [?] ", 'cyan'), end='')
17+
print(colored(f"{self.message} : ", 'cyan'), end='')
1818
data = input()
19-
20-
return str(data)
19+
if data == "":
20+
SearchError("Input data empty", "Please try again ")
21+
sys.exit()
22+
else:
23+
return str(data)
2124

2225

2326
class Search():

0 commit comments

Comments
 (0)