Fixed bug when station containing "to" was treated as separator
This commit is contained in:
parent
78c337a8eb
commit
274c5b1b48
1 changed files with 2 additions and 2 deletions
4
bot.py
4
bot.py
|
@ -25,10 +25,10 @@ class Query:
|
|||
self.departure_count = int(args[-1])
|
||||
last_index_string -= 1
|
||||
request_tmp = ' '.join(args[0:last_index_string]).strip()
|
||||
separator_index = request_tmp.find("to")
|
||||
separator_index = request_tmp.find(" to ")
|
||||
if separator_index != -1:
|
||||
self.input = request_tmp[:separator_index - 1].strip()
|
||||
self.destination = request_tmp[separator_index + 2:].strip()
|
||||
self.destination = request_tmp[separator_index + 4:].strip()
|
||||
else:
|
||||
self.input = request_tmp
|
||||
if args[0].isdigit():
|
||||
|
|
Loading…
Reference in a new issue