Author: sebb
Date: Mon Jun 23 16:09:13 2025
New Revision: 1926665

URL: http://svn.apache.org/viewvc?rev=1926665&view=rev
Log:
add_note not available before 3.11

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=1926665&r1=1926664&r2=1926665&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/mailglomper2.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/mailglomper2.py Mon Jun 23 
16:09:13 2025
@@ -104,7 +104,8 @@ async def weekly_stats(client, listpart,
         mldata = await (await client.get(url)).json()
     except Exception as err:
         tsprint(f"Failed fetching {url}: {err}")
-        err.add_note(f"Failed fetching {url}: {err}")
+        if hasattr(err, 'add_note'):
+            err.add_note(f"Failed fetching {url}: {err}")
         raise
     weekly = {}
     count = 0
@@ -172,7 +173,9 @@ async def gather_stats():
             tsprint("Interrupted processing of %s" % ml)
 
         except Exception as e:  # add some context
-            e.add_note(f"While processing {listpart}@{domainpart}")
+            tsprint(f"While processing {listpart}@{domainpart} failed with 
{str(e)}")
+            if hasattr(e, 'add_note'):
+                e.add_note(f"While processing {listpart}@{domainpart}")
             raise
 
         if interrupted:


Reply via email to