[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/Transience/Transience.py fix

Andreas Jung andreas at andreas-jung.com
Sun Jan 8 06:08:50 EST 2006


Log message for revision 41203:
  fix
  

Changed:
  U   Zope/trunk/lib/python/Products/Transience/Transience.py

-=-
Modified: Zope/trunk/lib/python/Products/Transience/Transience.py
===================================================================
--- Zope/trunk/lib/python/Products/Transience/Transience.py	2006-01-08 11:00:06 UTC (rev 41202)
+++ Zope/trunk/lib/python/Products/Transience/Transience.py	2006-01-08 11:08:49 UTC (rev 41203)
@@ -435,10 +435,9 @@
             length = self._length() # XXX ReadConflictError hotspot
 
             if self._limit and length >= self._limit:
-                LOG('Transience', WARNING,
-                    ('Transient object container %s max subobjects '
-                     'reached' % self.getId())
-                    )
+                LOG.warn('Transient object container %s max subobjects '
+                         'reached' % self.getId())
+                    
                 raise MaxTransientObjectsExceeded, (
                  "%s exceeds maximum number of subobjects %s" %
                  (length, self._limit))
@@ -797,11 +796,8 @@
             except (KeyError, AttributeError):
                 path = self.getPhysicalPath()
                 err = 'No such onAdd/onDelete method %s referenced via %s'
-                LOG('Transience',
-                    WARNING,
-                    err % (callback, '/'.join(path)),
-                    error=sys.exc_info()
-                    )
+                LOG.warn(err % (callback, '/'.join(path)),
+                         exc_info=sys.exc_info())
                 return
         else:
             method = callback
@@ -818,22 +814,16 @@
                 except:
                     # dont raise, just log
                     path = self.getPhysicalPath()
-                    LOG('Transience',
-                        WARNING,
-                        '%s failed when calling %s in %s' % (name,callback,
-                                                        '/'.join(path)),
-                        error=sys.exc_info()
-                        )
+                    LOG.warn('%s failed when calling %s in %s' % (name,callback,
+                                                                 '/'.join(path)),
+                             exc_info=sys.exc_info())
             finally:
                 setSecurityManager(sm)
         else:
             err = '%s in %s attempted to call non-callable %s'
             path = self.getPhysicalPath()
-            LOG('Transience',
-                WARNING,
-                err % (name, '/'.join(path), callback),
-                error=sys.exc_info()
-                )
+            LOG.warn(err % (name, '/'.join(path), callback),
+                     exc_info=sys.exc_info())
 
     def getId(self):
         return self.id



More information about the Zope-Checkins mailing list