summaryrefslogtreecommitdiffstats
path: root/Lib/Cookie.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-08-14 22:01:24 (GMT)
committerGeorg Brandl <georg@python.org>2006-08-14 22:01:24 (GMT)
commitd76bd69712e04d496e88f878f13876ce9c1765b0 (patch)
tree7306b7f7ff3f0a79b7adbc6dddc239fe3e54dbc2 /Lib/Cookie.py
parent7a1af770b9fbf73e967fac9ad224e6caad62e4cc (diff)
downloadcpython-d76bd69712e04d496e88f878f13876ce9c1765b0.zip
cpython-d76bd69712e04d496e88f878f13876ce9c1765b0.tar.gz
cpython-d76bd69712e04d496e88f878f13876ce9c1765b0.tar.bz2
Cookie.py shouldn't "bogusly" use string._idmap.
Diffstat (limited to 'Lib/Cookie.py')
-rw-r--r--Lib/Cookie.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/Cookie.py b/Lib/Cookie.py
index 20a2941..33bc4c0 100644
--- a/Lib/Cookie.py
+++ b/Lib/Cookie.py
@@ -304,9 +304,11 @@ _Translator = {
'\372' : '\\372', '\373' : '\\373', '\374' : '\\374',
'\375' : '\\375', '\376' : '\\376', '\377' : '\\377'
}
+
+_idmap = ''.join(chr(x) for x in xrange(256))
def _quote(str, LegalChars=_LegalChars,
- idmap=string._idmap, translate=string.translate):
+ idmap=_idmap, translate=string.translate):
#
# If the string does not need to be double-quoted,
# then just return the string. Otherwise, surround
@@ -440,7 +442,7 @@ class Morsel(dict):
def set(self, key, val, coded_val,
LegalChars=_LegalChars,
- idmap=string._idmap, translate=string.translate ):
+ idmap=_idmap, translate=string.translate):
# First we verify that the key isn't a reserved word
# Second we make sure it only contains legal characters
if key.lower() in self._reserved: