mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
SF #726446: raise ValueError if width <= 0.
This commit is contained in:
parent
49128575e8
commit
21820cd925
1 changed files with 2 additions and 0 deletions
|
@ -197,6 +197,8 @@ class TextWrapper:
|
||||||
lines, but apart from that whitespace is preserved.
|
lines, but apart from that whitespace is preserved.
|
||||||
"""
|
"""
|
||||||
lines = []
|
lines = []
|
||||||
|
if self.width <= 0:
|
||||||
|
raise ValueError("invalid width %r (must be > 0)" % self.width)
|
||||||
|
|
||||||
while chunks:
|
while chunks:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue