mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
utils.web: Import urllib's urlencode into our namespace.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
56fbbe9f36
commit
c5896ff6cb
@ -42,6 +42,7 @@ from str import normalizeWhitespace
|
|||||||
Request = urllib2.Request
|
Request = urllib2.Request
|
||||||
urlquote = urllib.quote
|
urlquote = urllib.quote
|
||||||
urlunquote = urllib.unquote
|
urlunquote = urllib.unquote
|
||||||
|
urlencode = urllib.urlencode
|
||||||
|
|
||||||
class Error(Exception):
|
class Error(Exception):
|
||||||
pass
|
pass
|
||||||
@ -92,7 +93,7 @@ def getUrlFd(url, headers=None, data=None):
|
|||||||
"""getUrlFd(url, headers=None, data=None)
|
"""getUrlFd(url, headers=None, data=None)
|
||||||
|
|
||||||
Opens the given url and returns a file object. Headers and data are
|
Opens the given url and returns a file object. Headers and data are
|
||||||
dicts as per urllib2.Request's arguments."""
|
a dict and string, respectively, as per urllib2.Request's arguments."""
|
||||||
if headers is None:
|
if headers is None:
|
||||||
headers = defaultHeaders
|
headers = defaultHeaders
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user