mirror of
https://github.com/home-assistant/core
synced 2024-10-06 02:38:04 +00:00
Add timeout to auto detect config
This commit is contained in:
parent
24bb89df23
commit
4d0265cb7d
|
@ -907,7 +907,8 @@ class Config(object):
|
|||
_LOGGER.info('Auto detecting location and temperature unit')
|
||||
|
||||
try:
|
||||
info = requests.get('https://freegeoip.net/json/').json()
|
||||
info = requests.get(
|
||||
'https://freegeoip.net/json/', timeout=5).json()
|
||||
except requests.RequestException:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue