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. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Tux-droid-svn mailing list Tux-droid-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tux-droid-svn