summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/solver/asp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/solver/asp.py b/lib/spack/spack/solver/asp.py
index b83cf133c3..105d39049e 100644
--- a/lib/spack/spack/solver/asp.py
+++ b/lib/spack/spack/solver/asp.py
@@ -573,6 +573,10 @@ class PyclingoDriver(object):
self.rule(head=expr2, body=expr1)
def one_of_iff(self, head, versions):
+ # if there are no versions, skip this one_of_iff
+ if not versions:
+ return
+
self.out.write("%s :- %s.\n" % (head, AspOneOf(*versions)))
self.out.write("%s :- %s.\n" % (AspOneOf(*versions), head))