Commits

Richard Jones committed 7e2dce4

handle moar errors

Comments (0)

Files changed (1)

tools/integratestats

     dbconn.close()
 
 def integrate_remote(config, host, dbupdate=True):
-    index = urllib.urlopen('http://%s.pypi.python.org/local-stats/days/' % host).read()
+    url = 'http://%s.pypi.python.org/local-stats/days/' % host
+    try:
+        index = urllib.urlopen(url).read()
+    except Exception, e:
+        print 'ERROR %s for %s' % (e, url)
+        return
     files = set(re.findall('href=.(20..-..-..).bz2', index))
     try:
         integrated = open(statsdir+'/integrated/'+host).readlines()