Title: [117705] trunk/Tools
Revision
117705
Author
kev...@webkit.org
Date
2012-05-19 21:43:25 -0700 (Sat, 19 May 2012)

Log Message

[wx] Unreviewed build fix. Don't stop the build if a build system update check fails.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (117704 => 117705)


--- trunk/Tools/ChangeLog	2012-05-20 01:55:26 UTC (rev 117704)
+++ trunk/Tools/ChangeLog	2012-05-20 04:43:25 UTC (rev 117705)
@@ -1,3 +1,10 @@
+2012-05-19  Kevin Ollivier  <kev...@theolliviers.com>
+
+        [wx] Unreviewed build fix. Don't stop the build if a build system update check fails.
+        
+        * waf/build/build_utils.py:
+        (download_if_newer):
+
 2012-05-19  Ryosuke Niwa  <rn...@webkit.org>
 
         Build fix. Sometimes --suffixes isn't supplied.

Modified: trunk/Tools/waf/build/build_utils.py (117704 => 117705)


--- trunk/Tools/waf/build/build_utils.py	2012-05-20 01:55:26 UTC (rev 117704)
+++ trunk/Tools/waf/build/build_utils.py	2012-05-20 04:43:25 UTC (rev 117705)
@@ -29,6 +29,7 @@
 import platform
 import re
 import shutil
+import socket
 import sys
 import urllib2
 import urllib
@@ -103,7 +104,7 @@
         urlobj = urllib2.urlopen(url, timeout=20)
     except:
         if os.path.exists(destfile):
-            return None # 
+            return None # We've at least got a file, use it for now.
         else:
             raise
     size = long(urlobj.info().getheader('Content-Length'))
@@ -113,14 +114,22 @@
         if downloaded > total_size:
             downloaded = total_size
         sys.stdout.write('%s %d of %d bytes downloaded\r' % (filename, downloaded, total_size))
+    
+    try:
+        urlobj = urllib.urlopen(url)
+        size = long(urlobj.info().getheader('Content-Length'))
 
-    # NB: We don't check modified time as Python doesn't yet handle timezone conversion
-    # properly when converting strings to time objects.
-    if not os.path.exists(destfile) or os.path.getsize(destfile) != size:
-        urllib.urlretrieve(url, destfile, download_callback)
-        print ''
-        return destfile
-
+        # NB: We don't check modified time as Python doesn't yet handle timezone conversion
+        # properly when converting strings to time objects.
+        if not os.path.exists(destfile) or os.path.getsize(destfile) != size:
+            urllib.urlretrieve(url, destfile, download_callback)
+            print ''
+            return destfile
+    except Exception, e:
+        # if there's a connection error, just ignore it
+        print e
+        pass
+        
     return None
 
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to