From 9eefa67035d964c022cc4d480e3b5ec14a29d893 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 31 Aug 2015 08:53:59 -0700 Subject: [PATCH] Add Python 3.4 check back --- homeassistant/__main__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/homeassistant/__main__.py b/homeassistant/__main__.py index dc8249bcbb5..d7e81eee13c 100644 --- a/homeassistant/__main__.py +++ b/homeassistant/__main__.py @@ -10,6 +10,15 @@ import homeassistant.config as config_util from homeassistant.const import __version__, EVENT_HOMEASSISTANT_START +def validate_python(): + """ Validate we're running the right Python version. """ + major, minor = sys.version_info[:2] + + if major < 3 or (major == 3 and minor < 4): + print("Home Assistant requires atleast Python 3.4") + sys.exit(1) + + def ensure_config_path(config_dir): """ Validates configuration directory. """ @@ -74,6 +83,8 @@ def get_arguments(): def main(): """ Starts Home Assistant. """ + validate_python() + args = get_arguments() config_dir = os.path.join(os.getcwd(), args.config)