renamed mailchecker.timeout to mailchecker.check

This commit is contained in:
Patrick Ulbrich
2011-11-15 21:55:33 +01:00
parent 5e7b039e36
commit a5bb6b3899
2 changed files with 5 additions and 5 deletions

View File

@@ -57,7 +57,7 @@ class MailChecker:
Notify.init(cfg.get('general', 'messagetray_label')) # initialize Notification
def timeout(self, firstcheck = False):
def check(self, firstcheck = False):
with self.mailcheck_lock:
print 'Checking email accounts at:', time.asctime()
self.pid.kill() # kill all zombies

View File

@@ -63,7 +63,7 @@ def delete_pid(): # delete file mailnag.pid
# delete_pid()
# exit(0)
# elif command == 'check': # check immediatelly for new emails
# mailchecker.timeout()
# mailchecker.check()
# else:
# command_list = command.split(' ') # create list of arguments
# pid.append(subprocess.Popen(command_list)) # execute 'command'
@@ -109,13 +109,13 @@ def main():
accounts = Accounts(cfg)
mailchecker = MailChecker(cfg, accounts)
mailchecker.timeout(True) # immediate check, firstcheck=True
mailchecker.check(True) # immediate check, firstcheck=True
check_interval = int(cfg.get('general', 'check_interval'))
GObject.timeout_add_seconds(60 * check_interval, mailchecker.timeout)
GObject.timeout_add_seconds(60 * check_interval, mailchecker.check)
if False:
idlers = Idlers(accounts, mailchecker.timeout)
idlers = Idlers(accounts, mailchecker.check)
idlers.run()
mainloop = GObject.MainLoop()