[FIX] removed bad and useless call to ping (this is not a correct way of checking...
authorOlivier Dony <odo@openerp.com>
Thu, 22 Apr 2010 16:36:15 +0000 (18:36 +0200)
committerOlivier Dony <odo@openerp.com>
Thu, 22 Apr 2010 16:36:15 +0000 (18:36 +0200)
bzr revid: odo@openerp.com-20100422163615-7y8512iwaj0odf2z

addons/fetchmail/fetchmail.py
addons/smtpclient/smtpclient.py

index c42ed79..feb88b5 100644 (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))
             
index 3cb6c48..eff5e24 100644 (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'})