[CMF-checkins] CVS: Products/CMFCore - CMFCorePermissions.py:1.10 ContentTypeRegistry.py:1.7 CookieCrumbler.py:1.11 FSObject.py:1.8 TypesTool.py:1.24
Tres Seaver
tseaver@zope.com
Thu, 29 Nov 2001 16:47:35 -0500
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv2297
Modified Files:
CMFCorePermissions.py ContentTypeRegistry.py CookieCrumbler.py
FSObject.py TypesTool.py
Log Message:
- Cosmetic cleanups (tracker #341)
=== Products/CMFCore/CMFCorePermissions.py 1.9 => 1.10 ===
##############################################################################
+"""Declare named permissions used throughout the CMF.
+$Id$
+"""
+__version__='$Revision$'[11:-2]
+
import Globals, AccessControl, Products
from AccessControl import Permissions
=== Products/CMFCore/ContentTypeRegistry.py 1.6 => 1.7 ===
"""
Basic Site content type registry
+$Id$
"""
+__version__='$Revision$'[11:-2]
from OFS.SimpleItem import SimpleItem, Item
from AccessControl import ClassSecurityInfo
=== Products/CMFCore/CookieCrumbler.py 1.10 => 1.11 ===
security.declarePrivate('delRequestVar')
def delRequestVar(self, req, name):
+ # No errors of any sort may propagate, and we don't care *what*
+ # they are, even to log them.
try: del req.other[name]
except: pass
try: del req.form[name]
@@ -180,6 +182,8 @@
def _cleanupResponse(self):
resp = self.REQUEST['RESPONSE']
+ # No errors of any sort may propagate, and we don't care *what*
+ # they are, even to log them.
try: del resp.unauthorized
except: pass
try: del resp._unauthorized
@@ -279,6 +283,9 @@
def __del__(self):
# Free the references.
+ #
+ # No errors of any sort may propagate, and we don't care *what*
+ # they are, even to log them.
try: del self.resp.unauthorized
except: pass
try: del self.resp._unauthorized
=== Products/CMFCore/FSObject.py 1.7 => 1.8 ===
finally:
file.close()
- except:
+ except: # No errors of any sort may propagate
data = self.file_contents = None #give up
return data
=== Products/CMFCore/TypesTool.py 1.23 => 1.24 ===
return m
return None
- except:
+ except: # only raise if allowed
if raise_exc:
raise
return None
@@ -613,7 +613,7 @@
if type( contentType ) is not type( '' ):
try:
contentType = contentType._getPortalTypeName()
- except:
+ except: # if we can't get or call it for any reason, fall back...
contentType = contentType.meta_type
ob = getattr( self, contentType, None )
if getattr(aq_base(ob), '_isTypeInformation', 0):