Catch Exceptions in web page requests.
This commit is contained in:
parent
b4c2df8173
commit
da296d5b9a
@ -3,7 +3,7 @@
|
|||||||
__author__ = "Davide Testa"
|
__author__ = "Davide Testa"
|
||||||
__email__ = "davide@davte.it"
|
__email__ = "davide@davte.it"
|
||||||
__license__ = "GNU General Public License v3.0"
|
__license__ = "GNU General Public License v3.0"
|
||||||
__version__ = "1.2.1"
|
__version__ = "1.2.2"
|
||||||
__maintainer__ = "Davide Testa"
|
__maintainer__ = "Davide Testa"
|
||||||
__contact__ = "t.me/davte"
|
__contact__ = "t.me/davte"
|
||||||
|
|
||||||
|
@ -1582,6 +1582,7 @@ async def check_service_status(bot: davtelepot.bot.Bot,
|
|||||||
interval = interval.total_seconds()
|
interval = interval.total_seconds()
|
||||||
while 1:
|
while 1:
|
||||||
ciclopi_data = await ciclopi_web_page.get_page()
|
ciclopi_data = await ciclopi_web_page.get_page()
|
||||||
|
if ciclopi_data is not None and not isinstance(ciclopi_data, Exception):
|
||||||
stations = _get_stations(
|
stations = _get_stations(
|
||||||
data=ciclopi_data,
|
data=ciclopi_data,
|
||||||
location=default_location
|
location=default_location
|
||||||
|
Loading…
x
Reference in New Issue
Block a user