From db4ff2ce5603fcd284e55102989162e84220e192 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 2 May 2013 13:36:55 -0400 Subject: [PATCH] feedback-bot: Fix indentation of StreamLogger code. (imported from commit 8bb1d04257c12fb2787349cd2d049e52e96a23b0) --- bots/feedback-bot | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bots/feedback-bot b/bots/feedback-bot index 2900dd6..973dc26 100755 --- a/bots/feedback-bot +++ b/bots/feedback-bot @@ -7,20 +7,20 @@ sys.path.append(path.join(path.dirname(__file__), '..')) import humbug class StreamLogger(object): - """ - Give a file-like interface to a logger instance. - """ - def __init__(self, logger, log_level=logging.INFO): - self.logger = logger - self.log_level = log_level - self.buffer = "" + """ + Give a file-like interface to a logger instance. + """ + def __init__(self, logger, log_level=logging.INFO): + self.logger = logger + self.log_level = log_level + self.buffer = "" - def write(self, message): - self.buffer += message + def write(self, message): + self.buffer += message - if message[-1] == "\n": - self.logger.log(self.log_level, self.buffer.rstrip()) - self.buffer = "" + if message[-1] == "\n": + self.logger.log(self.log_level, self.buffer.rstrip()) + self.buffer = "" logging.basicConfig(filename="/var/log/humbug/feedback-bot.log", level=logging.DEBUG, format="%(asctime)s %(levelname)s\t%(message)s")