From b8942672378fccc7d557dfc2e40a4d90aecf7a0d Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 28 Jun 2014 15:53:29 +0200 Subject: [Lib] Revert libraries to original status (remove all cosmetics optimizations) --- module/lib/MultipartPostHandler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/lib/MultipartPostHandler.py') 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]) -- cgit v1.2.3