Skip to content

Commit

Permalink
Merge pull request #10 from yurnov/development
Browse files Browse the repository at this point in the history
fix: fixed state of MAP_URL when MAP is not defined
  • Loading branch information
yurnov authored Jun 15, 2024
2 parents fda38ce + 5c492d0 commit f6c1637
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@
logger.warning("MAP_URL is not defined in .env file, using a default URL http://alerts.net.ua/alerts_map.png")
MAP_URL = "http://alerts.net.ua/alerts_map.png"
else:
MAP_URL = MAP_URL.strip('"')
if MAP_URL:
MAP_URL = MAP_URL.strip('"')
# ensure that MAP_URL is a valid URL with image (based on Content-Type)
try:
resp = requests.head(MAP_URL, timeout=15)
Expand Down

0 comments on commit f6c1637

Please sign in to comment.