summaryrefslogtreecommitdiffstats
path: root/Mac/Lib/EasyDialogs.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1998-09-28 10:37:08 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1998-09-28 10:37:08 (GMT)
commitd5af7bd489480d6720359db18ed1a391a0f61216 (patch)
tree3cc236048194c7539514e867125b8b7ae70692ee /Mac/Lib/EasyDialogs.py
parenta5a018fbd49b29da3726905388e68c2e56b49cfd (diff)
downloadcpython-d5af7bd489480d6720359db18ed1a391a0f61216.zip
cpython-d5af7bd489480d6720359db18ed1a391a0f61216.tar.gz
cpython-d5af7bd489480d6720359db18ed1a391a0f61216.tar.bz2
Truncate messages if they are longer than 255 characters. Note that this is
not really a good solution for default input strings...
Diffstat (limited to 'Mac/Lib/EasyDialogs.py')
-rw-r--r--Mac/Lib/EasyDialogs.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py
index 1b3f5ba..7e94fee 100644
--- a/Mac/Lib/EasyDialogs.py
+++ b/Mac/Lib/EasyDialogs.py
@@ -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):