From 57fc41a0c8492151fe192718eb4da17652021245 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Tue, 3 Feb 2009 13:45:27 +0000 Subject: [PATCH] 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 --- product/ERP5Wizard/Tool/WizardTool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product/ERP5Wizard/Tool/WizardTool.py b/product/ERP5Wizard/Tool/WizardTool.py index 14bafeba07..f03ebe4884 100644 --- a/product/ERP5Wizard/Tool/WizardTool.py +++ b/product/ERP5Wizard/Tool/WizardTool.py @@ -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() -- 2.30.9