You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/09/20 20:01:51 UTC

[incubator-ponymail-foal] branch master updated: use sys to figure it out

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 07382ea  use sys to figure it out
07382ea is described below

commit 07382ea0da0e9b04818181e27fdf15cee72fbc4e
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Sep 20 15:01:42 2021 -0500

    use sys to figure it out
---
 server/endpoints/mbox.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/endpoints/mbox.py b/server/endpoints/mbox.py
index 43f1ba0..2688dda 100644
--- a/server/endpoints/mbox.py
+++ b/server/endpoints/mbox.py
@@ -24,9 +24,10 @@ import plugins.defuzzer
 import re
 import typing
 import aiohttp.web
-try:
+import sys
+if sys.version_info >= (3,8):
     from asyncio.exceptions import CancelledError
-except:  # 3.7 ??
+elif sys.version_info >= (3,7):
     from asyncio import CancelledError
 import email.utils as eutils
 import datetime