summaryrefslogtreecommitdiffstats
path: root/bin/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-15 07:49:54 -0700
committerChris Larson <chris_larson@mentor.com>2010-04-15 07:49:54 -0700
commit87c15dfcbeb10e7cafb14726209e4954671b3dbe (patch)
tree180b823011c1e556137c6a38a05b011ec2c731b1 /bin/bitbake
parent1c6b31c649474b4c2b63ef9d9311e61de20bc8c2 (diff)
downloadbitbake-87c15dfcbeb10e7cafb14726209e4954671b3dbe.tar.gz
Move the python version check before the module imports, in case the modules utilize the newer python features
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-xbin/bitbake11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/bitbake b/bin/bitbake
index aee0a76fb..1c69f5f3e 100755
--- a/bin/bitbake
+++ b/bin/bitbake
@@ -22,10 +22,16 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-import sys, os, optparse
+import sys
+if sys.hexversion < 0x020600F0:
+ print "Sorry, python 2.6 or later is required for this version of bitbake"
+ sys.exit(1)
+
+import os
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])),
'lib'))
+import optparse
import warnings
import bb
import bb.msg
@@ -37,9 +43,6 @@ from bb.server import none
__version__ = "1.9.0"
-if sys.hexversion < 0x020600F0:
- print "Sorry, python 2.6 or later is required for this version of bitbake"
- sys.exit(1)
#============================================================================#