def __init__(self,confpath,minutes): self.counter = IMAPUnread(confpath) self.message = '' self.delay = minutes * 60 self.unread = 0 self.sleeping = False signal.signal(signal.SIGHUP, self._sighup)
class EmailStatusD(object): def __init__(self,confpath,minutes): self.counter = IMAPUnread(confpath) self.message = '' self.delay = minutes * 60 self.unread = 0 self.sleeping = False signal.signal(signal.SIGHUP, self._sighup) def getunread(self): try: count = self.counter.showunread() except LoginError, err: print('%s' % err) self._exit() else: