summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2013-08-28 18:41:16 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2013-08-28 18:41:16 -0700
commite2d4780f17c74652948030124c42e2c012f2c515 (patch)
tree620a823ccafe806e692f2b650146cf517b605f25
parent69cdd7a270e12f6c45ac417d3dbfadfc097c9f72 (diff)
downloadpyscss-e2d4780f17c74652948030124c42e2c012f2c515.tar.gz
Disallow writing out empty lists.
-rw-r--r--scss/types.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/scss/types.py b/scss/types.py
index 5d26185..4dc1918 100644
--- a/scss/types.py
+++ b/scss/types.py
@@ -613,6 +613,9 @@ class List(Value):
return List(self.value * int(other.value), use_comma=self.use_comma)
def render(self, compress=False):
+ if not self.value:
+ raise ValueError("Can't render empty list as CSS")
+
delim = self.delimiter(compress)
return delim.join(