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

Commit

Permalink
Hotfix for uncontrolled exception
Browse files Browse the repository at this point in the history
  • Loading branch information
MaanuelMM committed Jul 17, 2019
1 parent 1ed4863 commit e730149
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ def get_arrive_stop_clean(stop_id):
try:
arrive_stop_response = get_arrive_stop(
data.EMTMADRID_GETARRIVESTOPURL, get_token_clean(), stop_id, data.EMTMADRID_GETARRIVESTOPJSON)
arrive_stop = arrive_stop_response["data"][0]["Arrive"]
try:
arrive_stop = arrive_stop_response["data"][0]["Arrive"]
except:
arrive_stop = ""
del arrive_stop_response
except:
try:
Expand All @@ -208,7 +211,10 @@ def get_bicimad_clean(station_id):
try:
bicimad_response = get_bicimad(
data.EMTMADRID_GETBICIMADSTATIONSURL, get_token_clean(), station_id)
bicimad = bicimad_response["data"]
try:
bicimad = bicimad_response["data"]
except:
bicimad = ""
del bicimad_response
except:
try:
Expand All @@ -223,7 +229,10 @@ def get_parkings_clean():
try:
parkings_response = get_parkings(
data.EMTMADRID_GETPARKINGSSTATUSURL, get_token_clean())
parkings = parkings_response["data"]
try:
parkings = parkings_response["data"]
except:
parkings = ""
del parkings_response
except:
try:
Expand Down

0 comments on commit e730149

Please sign in to comment.