From 52c7321c78c8a81b6b557d67fe5af44b8b32df4c Mon Sep 17 00:00:00 2001 From: Connor Wolf Date: Sun, 11 Nov 2018 07:32:48 +0100 Subject: [PATCH] Handle unsupported version at runtime. If you have an ancient setuptools, 4a36ddb3aa77b8d1b1a64c197607fa652705856c won't successfully prevent installing. These changes will at least give a sane error, rather then just barfing on random syntax errors due to the `unicode` type not being present in py3k. Cherry picked from 2f20f2d --- src/octoprint/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/octoprint/__main__.py b/src/octoprint/__main__.py index 3dd81998d..9b1a759fc 100644 --- a/src/octoprint/__main__.py +++ b/src/octoprint/__main__.py @@ -2,6 +2,10 @@ # coding=utf-8 from __future__ import absolute_import, division, print_function +import sys +if sys.version_info[0] >= 3: + raise Exception("Octoprint does not support Python 3") + if __name__ == "__main__": import octoprint octoprint.main()