1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 17:39:31 +00:00

Drop an unnecessary second python version check and use the less ugly sys.version_info

(Bitbake rev: 8f4b7b10f8740a41c085beeca5105f15204b0979)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson
2010-04-15 08:14:53 -07:00
committed by Richard Purdie
parent bdbeaf4760
commit 231d3a534c
+2 -6
View File
@@ -23,8 +23,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import sys import sys
if sys.hexversion < 0x020600F0: if sys.version_info < (2, 6, 0):
print "Sorry, python 2.6 or later is required for this version of bitbake" print "Sorry, python 2.6.0 or later is required for this version of bitbake"
sys.exit(1) sys.exit(1)
import os import os
@@ -92,10 +92,6 @@ warnings.simplefilter("ignore", DeprecationWarning)
def main(): def main():
return_value = 0 return_value = 0
pythonver = sys.version_info
if pythonver[0] < 2 or (pythonver[0] == 2 and pythonver[1] < 5):
print "Sorry, bitbake needs python 2.5 or later."
sys.exit(1)
parser = optparse.OptionParser( parser = optparse.OptionParser(
version = "BitBake Build Tool Core version %s, %%prog version %s" % (bb.__version__, __version__), version = "BitBake Build Tool Core version %s, %%prog version %s" % (bb.__version__, __version__),