diff options
author | R. Tyler Ballance <tyler@slide.com> | 2009-09-10 14:37:52 -0700 |
---|---|---|
committer | R. Tyler Ballance <tyler@slide.com> | 2009-09-10 14:37:52 -0700 |
commit | 805727f468346f2a36de0c462ca0fe97026dd9da (patch) | |
tree | e1def2794a17a2e01d0ed1085a1801839f0d2f0f /cheetah | |
parent | 5b6eb450670fd8b320c20dc0b1a1492044a2e73c (diff) | |
download | python-cheetah-805727f468346f2a36de0c462ca0fe97026dd9da.tar.gz |
Use logging.info() instead of printing carelessly to stdout
Diffstat (limited to 'cheetah')
-rw-r--r-- | cheetah/Template.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/cheetah/Template.py b/cheetah/Template.py index 8cea1cf..01cf676 100644 --- a/cheetah/Template.py +++ b/cheetah/Template.py @@ -9,6 +9,7 @@ See the docstring in the Template class and the Users' Guide for more informatio import sys # used in the error handling code import re # used to define the internal delims regex import new # used to bind methods and create dummy modules +import logging import string import os.path import time # used in the cache refresh code @@ -1223,15 +1224,11 @@ class Template(Servlet): if isinstance(compilerSettings, dict) and compilerSettings.get('prioritizeSearchListOverSelf'): warn = False if warn: - print - print ''' *** WARNING *** ''' - print ''' The following keys are members of the Template class and will result in NameMapper collisions! ''' - print ''' > %s ''' % ', '.join(list(intersection)) - print - print ''' Please change the key's name or use the compiler setting "prioritizeSearchListOverSelf=True" to prevent the NameMapper from using ''' - print ''' the Template member in place of your searchList variable ''' - print ''' *************** ''' - print + logging.info(''' The following keys are members of the Template class and will result in NameMapper collisions! ''') + logging.info(''' > %s ''' % ', '.join(list(intersection))) + logging.info(''' Please change the key's name or use the compiler setting "prioritizeSearchListOverSelf=True" to prevent the NameMapper from using ''') + logging.info(''' the Template member in place of your searchList variable ''') + self._initCheetahInstance( searchList=searchList, namespaces=namespaces, |