mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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 = []
|
||||
if self.width <= 0:
|
||||
raise ValueError("invalid width %r (must be > 0)" % self.width)
|
||||
|
||||
while chunks:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue