summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-06-24 17:56:31 (GMT)
committerGeorg Brandl <georg@python.org>2012-06-24 17:56:31 (GMT)
commitfcbdbf22e3f0c17442c98d2091067f34f9770fc3 (patch)
tree7d58909a54055938a1d33302332a981d2f78f936
parent56261cff162dee2043b859986a6a73db52d27085 (diff)
downloadcpython-fcbdbf22e3f0c17442c98d2091067f34f9770fc3.zip
cpython-fcbdbf22e3f0c17442c98d2091067f34f9770fc3.tar.gz
cpython-fcbdbf22e3f0c17442c98d2091067f34f9770fc3.tar.bz2
urllib.request: fix spacing errors in exception/warning messages.
-rw-r--r--Lib/urllib/request.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 9cbf8aa..67b4c79 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -785,8 +785,8 @@ class ProxyHandler(BaseHandler):
self.proxies = proxies
for type, url in proxies.items():
setattr(self, '%s_open' % type,
- lambda r, proxy=url, type=type, meth=self.proxy_open: \
- meth(r, proxy, type))
+ lambda r, proxy=url, type=type, meth=self.proxy_open:
+ meth(r, proxy, type))
def proxy_open(self, req, proxy, type):
orig_type = req.type
@@ -1178,8 +1178,8 @@ class AbstractHTTPHandler(BaseHandler):
if request.data is not None: # POST
data = request.data
if isinstance(data, str):
- msg = "POST data should be bytes or an iterable of bytes."\
- "It cannot be str"
+ msg = "POST data should be bytes or an iterable of bytes. " \
+ "It cannot be of type str."
raise TypeError(msg)
if not request.has_header('Content-type'):
request.add_unredirected_header(
@@ -1576,7 +1576,7 @@ class URLopener:
# Constructor
def __init__(self, proxies=None, **x509):
- msg = "%(class)s style of invoking requests is deprecated."\
+ msg = "%(class)s style of invoking requests is deprecated. " \
"Use newer urlopen functions/methods" % {'class': self.__class__.__name__}
warnings.warn(msg, DeprecationWarning, stacklevel=3)
if proxies is None: