Commit 57fc41a0 authored by Ivan Tyagov's avatar Ivan Tyagov

Do not create new cookiejar object when old one can just be cleared.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25429 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 82da3c94
......@@ -318,7 +318,7 @@ class WizardTool(BaseTool):
user_and_password[0] and user_and_password[1]):
if user_and_password!=last_loggedin_user_and_password:
# credentials changed we need to renew __ac cookie from server as well
cookiejar = cookielib.CookieJar()
cookiejar.clear()
# try login to server only once using cookie method
if not _isUserAcknowledged(cookiejar):
server_url = self.getServerUrl()
......@@ -351,7 +351,7 @@ class WizardTool(BaseTool):
header_dict['REFERER'] = self.REQUEST.get('HTTP_REFERER', None) or referer
request = urllib2.Request(url, data, header_dict)
f = self.simple_opener_director.open(request)
try:
data = f.read()
metadata = f.info()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment