From 086a80d4436c9536f32724af9637a66d96f4b406 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 19 Apr 2011 21:04:58 -0400 Subject: [PATCH] convert agg_num to int following .status agg --- irc/commands/afc_status.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irc/commands/afc_status.py b/irc/commands/afc_status.py index 6996758..1c480c6 100644 --- a/irc/commands/afc_status.py +++ b/irc/commands/afc_status.py @@ -46,10 +46,13 @@ class AFCStatus(BaseCommand): elif data.args[0].startswith("agg") or data.args[0] == "a": try: - agg_num = data.args[1] + agg_num = int(data.args[1]) except IndexError: agg_data = (self.count_submissions(), self.count_redirects(), self.count_files()) agg_num = self.get_aggregate_number(agg_data) + except ValueError: + self.connection.reply(data, "%s isn't a number!" % data.args[1]) + return aggregate = self.get_aggregate(agg_num) self.connection.reply(data, "aggregate is currently %s (AfC %s)." % (agg_num, aggregate))