SF #726446: raise ValueError if width <= 0.
This commit is contained in:
parent
49128575e8
commit
21820cd925
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue