community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1838922 - in /comdev/reporter.apache.org: branches/TEST_INSTALL/scripts/scandist_test.py trunk/scripts/scandist_test.py
Date Fri, 24 Aug 2018 18:14:28 GMT
Author: sebb
Date: Fri Aug 24 18:14:28 2018
New Revision: 1838922

URL: http://svn.apache.org/viewvc?rev=1838922&view=rev
Log:
Variable test data

Modified:
    comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py
    comdev/reporter.apache.org/trunk/scripts/scandist_test.py

Modified: comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py?rev=1838922&r1=1838921&r2=1838922&view=diff
==============================================================================
--- comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py (original)
+++ comdev/reporter.apache.org/branches/TEST_INSTALL/scripts/scandist_test.py Fri Aug 24 18:14:28
2018
@@ -16,6 +16,7 @@ import scandist
 import json
 import ast
 import datetime
+import sys
 
 def processBatch():
     for project in scandist.targets:
@@ -30,11 +31,16 @@ def processBatch():
     scandist.processTargets()
     
 if __name__ == "__main__":
+    if len(sys.argv) > 1:
+        INPUT = sys.argv[1]
+    else:
+        INPUT = "scandist_test.dat"
+    print("Scanning %s" % INPUT)
     prevdate=None
     scandist.sendEmail = False
     #scandist.trace = True
     scandist.debug = True
-    with open("scandist_test.dat") as data:
+    with open(INPUT) as data:
         inCommit = False
         for line in data:
             if inCommit:

Modified: comdev/reporter.apache.org/trunk/scripts/scandist_test.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/scandist_test.py?rev=1838922&r1=1838921&r2=1838922&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/scandist_test.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/scandist_test.py Fri Aug 24 18:14:28 2018
@@ -16,6 +16,7 @@ import scandist
 import json
 import ast
 import datetime
+import sys
 
 def processBatch():
     for project in scandist.targets:
@@ -30,11 +31,16 @@ def processBatch():
     scandist.processTargets()
     
 if __name__ == "__main__":
+    if len(sys.argv) > 1:
+        INPUT = sys.argv[1]
+    else:
+        INPUT = "scandist_test.dat"
+    print("Scanning %s" % INPUT)
     prevdate=None
     scandist.sendEmail = False
     #scandist.trace = True
     scandist.debug = True
-    with open("scandist_test.dat") as data:
+    with open(INPUT) as data:
         inCommit = False
         for line in data:
             if inCommit:



Mime
View raw message