[tuxdroid-svn] r6048 - software_suite_v3/software/plugin/plugin-hotmail/trunk/executables
Status: Beta
                
                Brought to you by:
                
                    ks156
                    
                
            | 
      
      
      From: jerome <c2m...@c2...> - 2010-02-03 12:51:41
      
     | 
| Author: jerome
Date: 2010-02-03 13:51:20 +0100 (Wed, 03 Feb 2010)
New Revision: 6048
Modified:
   software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py
Log:
* Fixed a bug with internet connection check on xp.
Modified: software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py
===================================================================
--- software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py	2010-02-03 10:25:26 UTC (rev 6047)
+++ software_suite_v3/software/plugin/plugin-hotmail/trunk/executables/plugin-hotmail.py	2010-02-03 12:51:20 UTC (rev 6048)
@@ -300,9 +300,15 @@
     def isInternetAvailable(self):
         '''Ping for internet connection.
         '''
-        if not os.system('ping www.google.com -n 1'):
+        import urllib
+
+        url = 'http://www.google.com'
+        try:
+            response = urllib.urlopen(url)
+            the_page = response.read()
             return True
-        return False
+        except:
+            return False
         
     # --------------------------------------------------------------------------
     # Excecute the exe file that compiles a xml containing emails.
 |