This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new c46358b  address shadowing
c46358b is described below

commit c46358bd5331126e2448124631d7d0ac41b09c2a
Author: Daniel Gruno <[email protected]>
AuthorDate: Fri Sep 17 22:47:58 2021 -0500

    address shadowing
---
 server/endpoints/mbox.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/endpoints/mbox.py b/server/endpoints/mbox.py
index ec67eae..71bcb11 100644
--- a/server/endpoints/mbox.py
+++ b/server/endpoints/mbox.py
@@ -26,7 +26,7 @@ import typing
 import aiohttp.web
 import asyncio.exceptions
 import time
-import email.utils
+import email.utils as eutils
 import datetime
 import dateutil.tz
 
@@ -41,7 +41,7 @@ async def convert_source(session: 
plugins.session.SessionObject, email: dict):
             # If we have any Received: headers, we can extrapolate an 
approximate time from the last (top) one.
             from_match = re.search(r"(?:[\r\n]|^)Received:\s+from[^;]+?; 
(.+?)[\r\n]", source_as_text)
             if from_match:
-                recv_time = email.utils.parsedate_tz(from_match.group(1))
+                recv_time = eutils.parsedate_tz(from_match.group(1))
                 if recv_time:
                     dt_tuple = datetime.datetime(*recv_time[:7])
                     if recv_time[9]:  # If we have an offset, set timezone

Reply via email to