summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-04-30 09:48:56 +0100
committerCarl Hetherington <cth@carlh.net>2019-04-30 09:48:56 +0100
commitf2a2e263ed407b47f65057b618412422bf20599c (patch)
treef1f9ce7d9acbc6f23bc9857a86d45ddb594c0ae1
parent0bce69119675dfc8d0145104808e59cff642f941 (diff)
Fix crash with None specifiers.
-rwxr-xr-xcdist4
1 files changed, 2 insertions, 2 deletions
diff --git a/cdist b/cdist
index 56e0527..c1618c9 100755
--- a/cdist
+++ b/cdist
@@ -55,10 +55,10 @@ class Trees:
if t.name == name and t.specifier == specifier and t.target == target:
return t
elif t.name == name and t.specifier != specifier:
- a = specifier
+ a = specifier if specifier is not None else "[Any]"
if required_by is not None:
a += ' by %s' % required_by
- b = t.specifier
+ b = t.specifier if t.specifier is not None else "[Any]"
if t.required_by is not None:
b += ' by %s' % t.required_by
raise Error('conflicting versions of %s required (%s versus %s)' % (name, a, b))