Author: sebb
Date: Sun Jun 22 13:24:49 2025
New Revision: 1926642
URL: http://svn.apache.org/viewvc?rev=1926642&view=rev
Log:
Pylint
Modified:
comdev/reporter.apache.org/trunk/scripts/mailglomper2.py
Modified: comdev/reporter.apache.org/trunk/scripts/mailglomper2.py
URL:
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/mailglomper2.py?rev=1926642&r1=1926641&r2=1926642&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/mailglomper2.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/mailglomper2.py Sun Jun 22
13:24:49 2025
@@ -85,8 +85,7 @@ for i in range(0, 7):
months.append(date)
# Get the index of mailing lists
-# Not strictly necessary to cache this, but it makes testing easier
-data = requests.get("https://lists.apache.org/api/preferences.json").json()
+data = requests.get("https://lists.apache.org/api/preferences.json",
timeout=10).json()
tsprint("Fetched %u bytes of main data" % len(data))
@@ -182,11 +181,11 @@ async def gather_stats():
if now - lastCheckpoint > 120: # checkpoint every 2 minutes
lastCheckpoint = now
tsprint("Creating checkpoint of JSON files")
- with open(__MAILDATA_EXTENDED, "w+") as f:
+ with open(__MAILDATA_EXTENDED, "w+", encoding='utf-8') as f:
json.dump(mls, f, indent=1) # sort_keys is expensive
tsprint("Completed scanning, writing JSON files (%s)" % str(interrupted))
- with open(__MAILDATA_EXTENDED, "w+") as f:
+ with open(__MAILDATA_EXTENDED, "w+", encoding='utf-8') as f:
json.dump(mls, f, indent=1, sort_keys=True)
tsprint("Dumped JSON files")