diff options
author | 2014-06-28 15:53:29 +0200 | |
---|---|---|
committer | 2014-06-28 20:23:43 +0200 | |
commit | b8942672378fccc7d557dfc2e40a4d90aecf7a0d (patch) | |
tree | 1d4a4cd78988b0ac3c18fcad8e4f3791b11f3f27 /module/lib/MultipartPostHandler.py | |
parent | [Lib] Update bottle.py to version 0.12.7 (diff) | |
download | pyload-b8942672378fccc7d557dfc2e40a4d90aecf7a0d.tar.xz |
[Lib] Revert libraries to original status (remove all cosmetics optimizations)
Diffstat (limited to 'module/lib/MultipartPostHandler.py')
-rw-r--r-- | module/lib/MultipartPostHandler.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/lib/MultipartPostHandler.py b/module/lib/MultipartPostHandler.py index 4c0271c25..94aee0193 100644 --- a/module/lib/MultipartPostHandler.py +++ b/module/lib/MultipartPostHandler.py @@ -32,8 +32,8 @@ Example: cookies = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookies), MultipartPostHandler.MultipartPostHandler) - params = {"username": "bob", "password": "riviera", - "file": open("filename", "rb") } + params = { "username" : "bob", "password" : "riviera", + "file" : open("filename", "rb") } opener.open("http://wwww.bobsite.com/upload/", params) Further Example: @@ -123,9 +123,9 @@ def main(): def validateFile(url): temp = tempfile.mkstemp(suffix=".html") write(temp[0], opener.open(url).read()) - params = {"ss": "0", # show source - "doctype": "Inline", - "uploaded_file": open(temp[1], "rb") } + params = { "ss" : "0", # show source + "doctype" : "Inline", + "uploaded_file" : open(temp[1], "rb") } print opener.open(validatorURL, params).read() remove(temp[1]) |