same_source: handle being passed "None" as a version

Although this should never happen, rather than crashing if one of the
versions is none, simply indicate that they are unequal.

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
Adam D. Barratt 2013-03-17 10:33:59 +00:00
parent 00196429e2
commit 024df4f3af

View File

@ -988,6 +988,9 @@ class Britney(object):
if sv1 == sv2:
return 1
if sv1 is None or sv2 is None:
return 0
m = re.match(r'^(.*)\+b\d+$', sv1)
if m: sv1 = m.group(1)
m = re.match(r'^(.*)\+b\d+$', sv2)