diff --git a/build.py b/build.py index 88885d53f..c835d8036 100755 --- a/build.py +++ b/build.py @@ -35,7 +35,12 @@ # dart_compressed.js: The compressed Dart generator. # msg/js/.js for every language defined in msg/js/.json. -import errno, glob, httplib, json, os, re, subprocess, sys, threading, urllib +import sys +if sys.version_info[0] != 2: + raise Exception("Blockly build only compatible with Python 2.x.\n" + "You are using: " + sys.version) + +import errno, glob, httplib, json, os, re, subprocess, threading, urllib def import_path(fullpath):