summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-17 01:25:36 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-17 01:25:36 (GMT)
commit4004e21484145a485fc76d92f1c0e382457e92c2 (patch)
tree5ff2b98213951c7d924140362c988ee8ae27d9cb
parent0f868375ff991ad24fa7a9b79ceea9b64478c642 (diff)
downloadcpython-4004e21484145a485fc76d92f1c0e382457e92c2.zip
cpython-4004e21484145a485fc76d92f1c0e382457e92c2.tar.gz
cpython-4004e21484145a485fc76d92f1c0e382457e92c2.tar.bz2
Another fix for Split() -- don't refuse {"} but turn it into ".
This is needed because if a configure option has " as its value, it will be rendered as {"}; after stripping one level of quoting it's just ", on which splitlist will barf.
-rw-r--r--Modules/_tkinter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 3ce0fac..1315c1b 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -255,7 +255,13 @@ Split (self, list)
}
if (Tcl_SplitList (Tkapp_Interp (self), list, &argc, &argv) == TCL_ERROR)
- return Tkinter_Error (self);
+ {
+ /* Not a list.
+ Could be a quoted string containing funnies, e.g. {"}.
+ Return the string itself. */
+ PyErr_Clear();
+ return PyString_FromString(list);
+ }
if (argc == 0)
v = PyString_FromString ("");