[Erp5-report] r38690 jm - /erp5/trunk/products/ERP5Type/patches/getSite.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 27 19:47:46 CEST 2010
Author: jm
Date: Mon Sep 27 19:47:45 2010
New Revision: 38690
URL: http://svn.erp5.org?rev=38690&view=rev
Log:
Do not fail if there is no request when calling setSite on Zope 2.8
Although this could be an issue, getSite is not used for the moment.
Modified:
erp5/trunk/products/ERP5Type/patches/getSite.py
Modified: erp5/trunk/products/ERP5Type/patches/getSite.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/getSite.py?rev=38690&r1=38689&r2=38690&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/getSite.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/patches/getSite.py [utf8] Mon Sep 27 19:47:45 2010
@@ -18,7 +18,7 @@ except ImportError:
return None
def _setSite(site=None):
request = Globals.get_request()
- if site is not None and site not in request.get('PARENTS', ()):
+ if not (None in (site, request) or site in request.get('PARENTS', ())):
request['PARENTS'] = [site]
# patch getSite so that it works everywhere
@@ -34,7 +34,6 @@ def getSite():
return site
hooks.getSite = getSite
-last_cookie_value = None
def setSite(site=None):
_setSite(site)
if site is not None:
More information about the Erp5-report
mailing list