Commit 21820cd9 authored by Greg Ward's avatar Greg Ward

SF #726446: raise ValueError if width <= 0.

parent 49128575
......@@ -197,6 +197,8 @@ class TextWrapper:
lines, but apart from that whitespace is preserved.
"""
lines = []
if self.width <= 0:
raise ValueError("invalid width %r (must be > 0)" % self.width)
while chunks:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment