]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
vercmp: don't choke on empty first version components
authorChris Larson <chris_larson@mentor.com>
Fri, 26 Nov 2010 21:11:06 +0000 (14:11 -0700)
committerChris Larson <chris_larson@mentor.com>
Fri, 26 Nov 2010 21:11:37 +0000 (14:11 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/utils.py

index 19ca45d809d637b0c4f35c493e4ecc76b2972238..993f167e7811f6044fc4e4172c87d6865872c726 100644 (file)
@@ -93,7 +93,7 @@ def vercmp(ta, tb):
     (ea, va, ra) = ta
     (eb, vb, rb) = tb
 
-    r = int(ea)-int(eb)
+    r = int(ea or 0) - int(eb or 0)
     if (r == 0):
         r = vercmp_part(va, vb)
     if (r == 0):