You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by le...@apache.org on 2005/07/05 13:59:24 UTC
svn commit: r209261 -
/gump/branches/Gump3/pygump/python/gump/plugins/instrumentation.py
Author: leosimons
Date: Tue Jul 5 04:59:23 2005
New Revision: 209261
URL: http://svn.apache.org/viewcvs?rev=209261&view=rev
Log:
Extract out time format into property.
* pygump/python/gump/plugins/instrumentation.py: making the default time format into a property so it can be referenced elsewhere.
Modified:
gump/branches/Gump3/pygump/python/gump/plugins/instrumentation.py
Modified: gump/branches/Gump3/pygump/python/gump/plugins/instrumentation.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/plugins/instrumentation.py?rev=209261&r1=209260&r2=209261&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/instrumentation.py (original)
+++ gump/branches/Gump3/pygump/python/gump/plugins/instrumentation.py Tue Jul 5 04:59:23 2005
@@ -21,9 +21,11 @@
from gump.plugins import AbstractPlugin
+DEFAULT_TIME_FORMAT = '%d %b %Y %H:%M:%S'
+
class TimerPlugin(AbstractPlugin):
"""Set a date property on each model object as it is visited."""
- def __init__(self, propertyname, format='%d %b %Y %H:%M:%S'):
+ def __init__(self, propertyname, format=DEFAULT_TIME_FORMAT):
self.format = format
self.propertyname = propertyname