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>
master
Adam D. Barratt 11 years ago
parent 00196429e2
commit 024df4f3af

@ -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)

Loading…
Cancel
Save