From c3308451ab155a8e4cce8e7d3daa9375fce1cf0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 15 Mar 2011 09:15:51 +0000
Subject: [PATCH] actually check that contnet is not passed, not that it
 evaluates to false, otherwise log(a, b) prints b, a when b is false

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44282 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Log.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/Log.py b/product/ERP5Type/Log.py
index bfaede1a7f..55a798629d 100644
--- a/product/ERP5Type/Log.py
+++ b/product/ERP5Type/Log.py
@@ -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 = []
-- 
2.30.9