From b0dc96ff75950607b4afc62c308bb7ea278998ca Mon Sep 17 00:00:00 2001 From: David Bartley Date: Tue, 8 Apr 2008 19:02:00 -0400 Subject: [PATCH] Add term argument to mathsoclist --- ceo/console/mathsoclist.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ceo/console/mathsoclist.py b/ceo/console/mathsoclist.py index d977665..548e089 100644 --- a/ceo/console/mathsoclist.py +++ b/ceo/console/mathsoclist.py @@ -3,9 +3,10 @@ import re class MathSocList: help = ''' -mathsoclist +mathsoclist [term] -Prints a current list of members that are likely to be paying MathSoc members. +Displays a list of members for a term that are likely to be paying MathSoc +members; defaults to the current term if term is not given. ''' regex = ".*(mat/|vpa/se|computer science|math).*" @@ -13,7 +14,10 @@ Prints a current list of members that are likely to be paying MathSoc members. def main(self, args): regex = re.compile(self.regex) - mlist = members.list_term(terms.current()) + if len(args) == 1: + mlist = members.list_term(args[0]) + else: + mlist = members.list_term(terms.current()) dns = mlist.keys() dns.sort() for dn in dns: