mirror of https://github.com/python/cpython
Truncate messages if they are longer than 255 characters. Note that this is
not really a good solution for default input strings...
This commit is contained in:
parent
a5a018fbd4
commit
d5af7bd489
|
@ -28,6 +28,8 @@ def cr2lf(text):
|
|||
def lf2cr(text):
|
||||
if '\n' in text:
|
||||
text = string.join(string.split(text, '\n'), '\r')
|
||||
if len(text) > 253:
|
||||
text = text[:253] + '\311'
|
||||
return text
|
||||
|
||||
def Message(msg, id=256):
|
||||
|
|
Loading…
Reference in New Issue