Handle unsupported version at runtime.
If you have an ancient setuptools, 4a36ddb3aa
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.
This commit is contained in:
1 parent
4a36ddb3aa
commit
2f20f2dbb9
1 file changed
+4
@@ -2,6 +2,10 @@
|
|||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
from __future__ import absolute_import, division, print_function
|
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__":
|
if __name__ == "__main__":
|
||||||
import octoprint
|
import octoprint
|
||||||
octoprint.main()
|
octoprint.main()
|
||||||
Reference in new issue
Block a user