Exemple #1
0
 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)
Exemple #2
0
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: