From 4d0265cb7d6ba1a147517bad04d1f0b687bea6e0 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 24 Apr 2015 20:57:25 -0700 Subject: [PATCH] Add timeout to auto detect config --- homeassistant/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/__init__.py b/homeassistant/__init__.py index 5e54cbd5d0a..05bbb9b40ff 100644 --- a/homeassistant/__init__.py +++ b/homeassistant/__init__.py @@ -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