community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1757194 - /comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
Date Mon, 22 Aug 2016 15:11:33 GMT
Author: sebb
Date: Mon Aug 22 15:11:33 2016
New Revision: 1757194

URL: http://svn.apache.org/viewvc?rev=1757194&view=rev
Log:
Use a better name for git file failures

Modified:
    comdev/projects.apache.org/scripts/cronjobs/parseprojects.py

Modified: comdev/projects.apache.org/scripts/cronjobs/parseprojects.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parseprojects.py?rev=1757194&r1=1757193&r2=1757194&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parseprojects.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parseprojects.py Mon Aug 22 15:11:33 2016
@@ -252,7 +252,12 @@ for s in itemlist :
         print("-"*60, file=sys.stderr)
         failures.append(url)
         if rdf is not None:
-            with open (url.split('/')[-1], "wb") as f:
+            urlname = url.split('/')[-1]
+            rem = re.search(r';f=([^;]+);.*',urlname) # better name for Git files
+            if rem:
+                urlname = rem.group(1)
+            print("Saving invalid data in %s " % urlname)
+            with open (urlname, "wb") as f:
                 f.write(rdf)
                 f.close()
 



Mime
View raw message