From c5dd4f4c206dabfbf7b71c5c1406b99d6009020b Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 5 Sep 2018 23:58:47 -0400 Subject: [PATCH] bootstrap: add python2 error check Fail hard when run under Python 2. This catches delegated commands as well, since those are run by this file. Signed-off-by: Marti Bolivar --- src/bootstrap/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/main.py b/src/bootstrap/main.py index c0fb117..0971cc5 100644 --- a/src/bootstrap/main.py +++ b/src/bootstrap/main.py @@ -13,6 +13,9 @@ import platform import subprocess import sys +if sys.version_info < (3,): + sys.exit('fatal error: you are running Python 2') + MANIFEST = 'manifest' MANIFEST_DEFAULT = 'https://github.com/zephyrproject-rtos/manifest' MANIFEST_REV_DEFAULT = 'master'