--- a/mailer.py 2005-02-25 02:14:38.000000000 -0500 +++ b/mailer.py 2005-02-28 21:42:14.117590080 -0500 @@ -164,24 +164,18 @@ self.last_size=self.size if self.config['imap']: - try: - s = self.imaplib.__dict__['IMAP4'+['','_SSL'][self.config['ssl']]]\ - (self.config['host']) - s.login(self.config['user_name'],self.config['user_password']) - s.select() - size = len(s.search(None, 'UNSEEN')[1][0].split()) - s.logout() - except: - size = -1 + s = self.imaplib.__dict__['IMAP4'+['','_SSL'][self.config['ssl']]]\ + (self.config['host']) + s.login(self.config['user_name'],self.config['user_password']) + s.select() + size = len(s.search(None, 'UNSEEN')[1][0].split()) + s.logout() else: - try: - s = self.poplib.__dict__['POP3'+['','_SSL'][self.config['ssl']]]\ - (self.config['host']) - s.user(self.config['user_name']) - s.pass_(self.config['user_password']) - size=len(s.list()[1]) - except: - size= -1 + s = self.poplib.__dict__['POP3'+['','_SSL'][self.config['ssl']]]\ + (self.config['host']) + s.user(self.config['user_name']) + s.pass_(self.config['user_password']) + size=len(s.list()[1]) self.size=size return size