From 2a47190f283d6411ed5bc9211da2abd521bb3cd8 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 9 Oct 2007 21:50:48 +0200 Subject: [PATCH] When running from a terminal don't use logs. --- sugar/logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sugar/logger.py b/sugar/logger.py index 43d0d768..26b03ac5 100644 --- a/sugar/logger.py +++ b/sugar/logger.py @@ -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')