[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:
Olivier Dony
2010-04-22 18:36:15 +02:00
parent 69a7e6e1bd
commit eaf9a353f8
2 changed files with 0 additions and 8 deletions
-4
View File
@@ -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))
-4
View File
@@ -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'})