Bladeren bron

float->int fix; colorize branches in pull

tags/v0.1^2
Ben Kurtovic 12 jaren geleden
bovenliggende
commit
21983438b3
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. +3
    -3
      earwigbot/commands/git.py

+ 3
- 3
earwigbot/commands/git.py Bestand weergeven

@@ -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.")



Laden…
Annuleren
Opslaan