From 21983438b3c120bdb595b7cd1ec7c22128e1ceac Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 8 Apr 2012 22:58:25 -0400 Subject: [PATCH] float->int fix; colorize branches in pull --- earwigbot/commands/git.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/earwigbot/commands/git.py b/earwigbot/commands/git.py index f6fd215..df65fbe 100644 --- a/earwigbot/commands/git.py +++ b/earwigbot/commands/git.py @@ -95,7 +95,7 @@ class Command(BaseCommand): def get_time_since(self, date): diff = time.mktime(time.gmtime()) - date if diff < 60: - return "{0} seconds".format(diff) + return "{0} seconds".format(int(diff)) if diff < 60 * 60: return "{0} minutes".format(int(diff / 60)) if diff < 60 * 60 * 24: @@ -194,8 +194,8 @@ class Command(BaseCommand): if updated: update = ", ".join([info.ref.remote_head for info in updated]) - msg = "done; updates to {0} (from {1}).".format(update, remote.url) - self.reply(self.data, msg) + msg = "done; updates to \x0302{0}\x0301 (from {1})." + self.reply(self.data, msg.format(update, remote.url)) else: self.reply(self.data, "done; no new changes.")