Commit c3308451 authored by Jérome Perrin's avatar Jérome Perrin

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
parent 1decef02
...@@ -29,10 +29,11 @@ ...@@ -29,10 +29,11 @@
from zLOG import LOG, INFO from zLOG import LOG, INFO
from traceback import extract_stack 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 """Put a log message. This method is supposed to be used by
restricted environment, such as Script (Python).""" 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 description, content = content, description
st = extract_stack() st = extract_stack()
head = [] head = []
......
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