When running from a terminal don't use logs.

This commit is contained in:
Marco Pesenti Gritti 2007-10-09 21:50:48 +02:00
parent 56ecabbd78
commit 2a47190f28

View File

@ -44,7 +44,7 @@ def start(log_filename=None):
if os.environ.has_key('SUGAR_LOGGER_LEVEL'):
set_level(os.environ['SUGAR_LOGGER_LEVEL'])
if log_filename:
if log_filename and not sys.stdin.isatty():
log_path = os.path.join(get_logs_dir(), log_filename + '.log')
log_file = open(log_path, 'w')