mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-23 08:21:30 +00:00
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:
parent
7933a720aa
commit
858e8de218
@ -988,6 +988,9 @@ class Britney(object):
|
|||||||
if sv1 == sv2:
|
if sv1 == sv2:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
if sv1 is None or sv2 is None:
|
||||||
|
return 0
|
||||||
|
|
||||||
m = re.match(r'^(.*)\+b\d+$', sv1)
|
m = re.match(r'^(.*)\+b\d+$', sv1)
|
||||||
if m: sv1 = m.group(1)
|
if m: sv1 = m.group(1)
|
||||||
m = re.match(r'^(.*)\+b\d+$', sv2)
|
m = re.match(r'^(.*)\+b\d+$', sv2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user