Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

Commit

Permalink
Change config var to PARADA_CHAT_LIST to better understaanding
Browse files Browse the repository at this point in the history
  • Loading branch information
MaanuelMM committed Jul 15, 2019
1 parent 904cf30 commit 1ed4863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,8 @@ def send_hola(message):
def send_parada(message):
log_message(message)
text = get_text(message.text)
if(str(message.chat.id) in data.EMTMADRID_ARRIVE_LIST and text.upper() in
data.EMTMADRID_ARRIVE_LIST[str(message.chat.id)]):
text = data.EMTMADRID_ARRIVE_LIST[str(message.chat.id)][text.upper()]
if(str(message.chat.id) in data.PARADA_CHAT_LIST and text.upper() in data.PARADA_CHAT_LIST[str(message.chat.id)]):
text = data.PARADA_CHAT_LIST[str(message.chat.id)][text.upper()]
if is_integer(text):
try:
arrive_stop = get_arrive_stop_clean(text)
Expand Down
3 changes: 1 addition & 2 deletions data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def __init__(self):
self.URL = os.environ.get('URL')
self.EMTMADRID_EMAIL = os.environ.get('EMTMADRID_EMAIL')
self.EMTMADRID_PASSWORD = os.environ.get('EMTMADRID_PASSWORD')
self.EMTMADRID_ARRIVE_LIST = literal_eval(
os.environ.get('EMTMADRID_ARRIVE_LIST'))
self.PARADA_CHAT_LIST = literal_eval(os.environ.get('EMTMADRID_ARRIVE_LIST'))
logger.info("Successfully gotten Config Vars from server.")

# Get data from JSON file
Expand Down

0 comments on commit 1ed4863

Please sign in to comment.