Commit 110fdc8e authored by Tres Seaver's avatar Tres Seaver

Better fix for #2218.

parent 5bcc8d7f
...@@ -197,7 +197,7 @@ class Cacheable: ...@@ -197,7 +197,7 @@ class Cacheable:
mtime_func, default) mtime_func, default)
return val return val
except: except:
logger.warn('ZCache_get() exception', exc_info=sys.exc_info()) logger.warn('ZCache_get() exception', exc_info=True)
return default return default
return default return default
...@@ -214,7 +214,7 @@ class Cacheable: ...@@ -214,7 +214,7 @@ class Cacheable:
c.ZCache_set(ob, data, view_name, keywords, c.ZCache_set(ob, data, view_name, keywords,
mtime_func) mtime_func)
except: except:
logger.warn('ZCache_set() exception', exc_info=sys.exc_info()) logger.warn('ZCache_set() exception', exc_info=True)
def ZCacheable_invalidate(self, view_name='', REQUEST=None): def ZCacheable_invalidate(self, view_name='', REQUEST=None):
'''Called after a cacheable object is edited. Causes all '''Called after a cacheable object is edited. Causes all
...@@ -231,7 +231,7 @@ class Cacheable: ...@@ -231,7 +231,7 @@ class Cacheable:
except: except:
exc = sys.exc_info() exc = sys.exc_info()
try: try:
logger.warn('ZCache_invalidate() exception', exc_info=exc) logger.warn('ZCache_invalidate() exception', exc_info=True)
message = 'An exception occurred: %s: %s' % exc[:2] message = 'An exception occurred: %s: %s' % exc[:2]
finally: finally:
exc = None exc = None
......
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