From 024df4f3afd30a1c1108b50a03b6a955aff2d1b1 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Sun, 17 Mar 2013 10:33:59 +0000 Subject: [PATCH] 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 --- britney.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/britney.py b/britney.py index 252f722..59ae2a6 100755 --- a/britney.py +++ b/britney.py @@ -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)