]> code.ossystems Code Review - openembedded-core.git/commitdiff
Move the python version check before the module imports, in case the modules utilize...
authorChris Larson <chris_larson@mentor.com>
Thu, 15 Apr 2010 14:49:54 +0000 (07:49 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 2 Jul 2010 14:41:33 +0000 (15:41 +0100)
(Bitbake rev: 87c15dfcbeb10e7cafb14726209e4954671b3dbe)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/bin/bitbake

index 805d60102f237583844b90f2ac0ac5bd1ca2fe0d..7c1eb5f75a1ce92384e9af561864a3241375c630 100755 (executable)
 # 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)
 
 
 #============================================================================#