[FIX] removed bad and useless call to ping (this is not a correct way of checking for network connection: do the real connection and handle errors please)
bzr revid: odo@openerp.com-20100422163615-7y8512iwaj0odf2z
This commit is contained in:
@@ -326,10 +326,6 @@ class email_server(osv.osv):
|
||||
return self.fetch_mail(cr, uid, ids, context)
|
||||
|
||||
def fetch_mail(self, cr, uid, ids, context={}):
|
||||
fp = os.popen('ping www.google.com -c 1 -w 5',"r")
|
||||
if not fp.read():
|
||||
logger.notifyChannel('imap', netsvc.LOG_WARNING, 'No address associated with hostname !')
|
||||
|
||||
for server in self.browse(cr, uid, ids, context):
|
||||
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name))
|
||||
|
||||
|
||||
@@ -483,10 +483,6 @@ class smtpclient(osv.osv):
|
||||
return result
|
||||
|
||||
def _send_emails(self, cr, uid, ids, context={}):
|
||||
fp = os.popen('ping www.google.com -c 1 -w 5',"r")
|
||||
if not fp.read():
|
||||
return False
|
||||
|
||||
queue = self.pool.get('email.smtpclient.queue')
|
||||
history = self.pool.get('email.smtpclient.history')
|
||||
queue.write(cr, uid, ids, {'state':'sending'})
|
||||
|
||||
Reference in New Issue
Block a user