diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-04-10 13:37:02 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-06-28 02:51:58 +0200 |
commit | 2ff2fb0495febe11d5015d2308d67e1d8048e597 (patch) | |
tree | 2ae9d1da4a701fc6b3945ccc32dfbbf102b9c85a /module/lib/MultipartPostHandler.py | |
parent | Localization badge (diff) | |
download | pyload-2ff2fb0495febe11d5015d2308d67e1d8048e597.tar.xz |
Some code cosmetics about commas, spaces and quotes
Merges #577
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 94aee0193..4c0271c25 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]) |