From a0f5c3d885d3a37ad43cad626c5cfc0f312c1459 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 25 Feb 2010 13:45:28 +0000 Subject: [PATCH] minor update --- lib/request/connect.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index 23f62c615..7dbb7bfec 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -92,11 +92,10 @@ class Connect: requestMsg += "?%s" % params elif multipart: - proxyHandler = None - if not conf.proxy: - if conf.hostname in ('localhost', '127.0.0.1'): - proxyHandler = urllib2.ProxyHandler({}) - multipartOpener = urllib2.build_opener(*(proxyHandler, multipartpost.MultipartPostHandler) if proxyHandler else multipartpost.MultipartPostHandler) + #needed in this form because of potential circle dependency problem (option -> update -> connect -> option) + from lib.core.option import proxyHandler + + multipartOpener = urllib2.build_opener(proxyHandler, multipartpost.MultipartPostHandler) conn = multipartOpener.open(url, multipart) page = conn.read() responseHeaders = conn.info()