Mercurial > MadButterfly
changeset 1307:cfbc0f3e54e3
Add supporting for programmer defined prefix for data_monitor
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Thu, 20 Jan 2011 00:34:08 +0800 |
parents | 8c0a4684c1f7 |
children | 49775feefbcf |
files | pyink/data_monitor.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/data_monitor.py Wed Jan 19 18:47:40 2011 +0800 +++ b/pyink/data_monitor.py Thu Jan 20 00:34:08 2011 +0800 @@ -48,8 +48,13 @@ pass return sentinel + monitor_prefix = 'do' + if clazz_dict.has_key('__data_monitor_prefix__'): + monitor_prefix = clazz_dict['__data_monitor_prefix__'] + pass + for attr_name in clazz_dict: - if (not attr_name.startswith('do')) or \ + if (not attr_name.startswith(monitor_prefix)) or \ (not callable(clazz_dict[attr_name])): continue clazz_dict[attr_name] = \