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 2020/09/07 09:44:28 UTC

[incubator-ponymail-foal] 01/05: use the right path for the exception class

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

commit cf1d36be6cdef5a8efe3e67886e51d39dbaae400
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Sep 7 11:35:44 2020 +0200

    use the right path for the exception class
---
 server/plugins/mbox.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/server/plugins/mbox.py b/server/plugins/mbox.py
index 2f46399..a3ac061 100644
--- a/server/plugins/mbox.py
+++ b/server/plugins/mbox.py
@@ -35,6 +35,7 @@ from elasticsearch.helpers import async_scan
 
 import plugins.aaa
 import plugins.session
+import plugins.database
 
 PYPONY_RE_PREFIX = re.compile(r"^([a-zA-Z]+:\s*)+")
 
@@ -165,7 +166,7 @@ async def get_email(
                     doc = anonymize(doc)
                 doc["_source"]["id"] = doc["_source"]["mid"]
                 return doc["_source"]
-        except session.database.DBError:
+        except plugins.database.DBError:
             pass
     elif messageid:
         res = await session.database.search(
@@ -202,7 +203,7 @@ async def get_source(session: plugins.session.SessionObject, permalink: str = No
     try:
         doc = await session.database.get(index=doctype, id=permalink)
         return doc
-    except session.database.DBError:
+    except plugins.database.DBError:
         pass
     res = await session.database.search(
         index=doctype,