From ebb96bdba0ffc6be38fcf70af7d3e2640df41fe3 Mon Sep 17 00:00:00 2001 From: Harshavardhan Rangan Date: Mon, 28 Nov 2011 08:04:21 -0500 Subject: [PATCH] cleaned up how main is called --- gmail.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gmail.py b/gmail.py index ae64b16..a6cd7ac 100755 --- a/gmail.py +++ b/gmail.py @@ -197,7 +197,7 @@ def parse_cmd_line(): return options, args -if __name__ == '__main__': +def main(): options, args = parse_cmd_line() @@ -222,9 +222,6 @@ if __name__ == '__main__': else: accounts = [(options.username, options.password)] - feeds = [] - passwords = [] - import getpass for username in args: accounts.append((username, getpass.getpass('Enter password for account %s: ' % username))) @@ -249,3 +246,7 @@ if __name__ == '__main__': print '\n%s%s messages recieved' % (reduce(lambda x, y: x+y, count) if count else 'No', ' ( %s )' % ' + '.join([str(i) for i in count]) if len(count)>1 else '' ) + + +if __name__ == '__main__': + main() -- 2.11.4.GIT