[Erp5-report] r44282 jerome - /erp5/trunk/products/ERP5Type/Log.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 15 10:15:51 CET 2011
Author: jerome
Date: Tue Mar 15 10:15:51 2011
New Revision: 44282
URL: http://svn.erp5.org?rev=44282&view=rev
Log:
actually check that contnet is not passed, not that it evaluates to false,
otherwise log(a, b) prints b, a when b is false
Modified:
erp5/trunk/products/ERP5Type/Log.py
Modified: erp5/trunk/products/ERP5Type/Log.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Log.py?rev=44282&r1=44281&r2=44282&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Log.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Log.py [utf8] Tue Mar 15 10:15:51 2011
@@ -29,10 +29,11 @@
from zLOG import LOG, INFO
from traceback import extract_stack
-def log(description, content = '', level = INFO):
+marker_ = []
+def log(description, content=marker_, level=INFO):
"""Put a log message. This method is supposed to be used by
restricted environment, such as Script (Python)."""
- if not content: # allow for content only while keeping interface
+ if content is marker_: # allow for content only while keeping interface
description, content = content, description
st = extract_stack()
head = []
More information about the Erp5-report
mailing list