community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1867032 - in /comdev/projects.apache.org/trunk/scripts/cronjobs: parsecommitteeinfo.py parsecommitters.py parseprojects.py
Date Mon, 16 Sep 2019 22:50:40 GMT
Author: sebb
Date: Mon Sep 16 22:50:40 2019
New Revision: 1867032

URL: http://svn.apache.org/viewvc?rev=1867032&view=rev
Log:
Pylint

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

Modified: comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py?rev=1867032&r1=1867031&r2=1867032&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py (original)
+++ comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitteeinfo.py Mon Sep 16 22:50:40
2019
@@ -1,3 +1,15 @@
+"""
+
+Reads:
+../../data/committees.xml
+committee-info.txt from Whimsy
+
+Updates:
+../../site/json/foundation/committees.json
+../../site/json/foundation/committees-retired.json
+
+"""
+
 import errtee
 import re
 import json
@@ -16,18 +28,6 @@ import sendmail
 sys.path.append("..") # module committee_info is in parent directory
 import committee_info
 
-"""
-
-Reads:
-../../data/committees.xml
-committee-info.txt from Whimsy
-
-Updates:
-../../site/json/foundation/committees.json
-../../site/json/foundation/committees-retired.json
-
-"""
-
 # LDAP group ids not matching committee id; convert group to committeeId
 group_ids = {
     'ws': 'webservices'

Modified: comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitters.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitters.py?rev=1867032&r1=1867031&r2=1867032&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitters.py (original)
+++ comdev/projects.apache.org/trunk/scripts/cronjobs/parsecommitters.py Mon Sep 16 22:50:40
2019
@@ -1,5 +1,3 @@
-import errtee
-import sys
 """
 
 Reads:
@@ -22,6 +20,8 @@ Creates:
 
 """
 
+import errtee
+import sys
 import io
 import json
 from urlutils import UrlCache
@@ -118,11 +118,11 @@ currentYear = now.year
 firstYear=1999 # earliest date in existing data
 firstKey="%04u-%02u" % (firstYear, 1) # catch all earlier entries
 for y in range(firstYear,currentYear+1):
-	for m in range(1,13): # end is exclusive
-		ym = "%04u-%02u" % (y, m)
-		accounts[ym]=0
-		if y == currentYear and m == currentMonth:
-			break
+    for m in range(1,13): # end is exclusive
+        ym = "%04u-%02u" % (y, m)
+        accounts[ym]=0
+        if y == currentYear and m == currentMonth:
+            break
 
 for p in ldappeople:
     stamp = ldappeople[p]['createTimestamp']

Modified: comdev/projects.apache.org/trunk/scripts/cronjobs/parseprojects.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/trunk/scripts/cronjobs/parseprojects.py?rev=1867032&r1=1867031&r2=1867032&view=diff
==============================================================================
--- comdev/projects.apache.org/trunk/scripts/cronjobs/parseprojects.py (original)
+++ comdev/projects.apache.org/trunk/scripts/cronjobs/parseprojects.py Mon Sep 16 22:50:40
2019
@@ -1,17 +1,3 @@
-import errtee
-import sys
-if sys.hexversion < 0x03000000:
-    raise ImportError("This script requires Python 3")
-from xml.dom import minidom
-import xml.etree.ElementTree as ET
-import re, urllib.request
-import urllib.error
-import json
-import os
-from os.path import join
-import traceback
-import sendmail
-
 """
 
 Reads:
@@ -29,19 +15,33 @@ Deletes any obsolete files from:
 
 """
 
+import errtee
+import sys
+if sys.hexversion < 0x03000000:
+    raise ImportError("This script requires Python 3")
+from xml.dom import minidom
+import xml.etree.ElementTree as ET
+import re, urllib.request
+import urllib.error
+import json
+import os
+from os.path import join
+import traceback
+import sendmail
+
 URL_TIMEOUT = 60.0 # timeout for URL requests (may need tweaking)
 
 PROJECTS_DIR = '../../site/json/projects'
 
-projectsList = "../../data/projects.xml";
+projectsList = "../../data/projects.xml"
 PROJECTS_SVN = 'https://svn.apache.org/repos/asf/comdev/projects.apache.org/trunk/data/projects.xml'
 
-save = True;
+save = True
 if os.path.exists("parseprojects-failures.xml"):
     # Only use restart data if requested (e.g. when running interactively)
     if 'restart' in sys.argv:
-        projectsList = "parseprojects-failures.xml";
-        save = False;
+        projectsList = "parseprojects-failures.xml"
+        save = False
     else:
         print("Previous run failed, ignoring restart data")
 
@@ -169,7 +169,7 @@ for s in itemlist :
         for el in project:
             k, v = handleChild(el)
             if not save:
-                print("+ %s" % k);
+                print("+ %s" % k)
             if k in pjson and not k in ['name','homepage']:
                 if type(pjson[k]) is str:
                     pjson[k] = "%s, %s" % (pjson[k], v)



Mime
View raw message