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/08 18:50:23 UTC
[incubator-ponymail-foal] branch master updated (73dac0e -> 148c965)
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git.
from 73dac0e Simplify
new 80f303e only catch DBError (doc not found)
new 148c965 fix index reference
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
server/endpoints/email.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
[incubator-ponymail-foal] 02/02: fix index reference
Posted by hu...@apache.org.
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 148c9651854db4f7dd3b62c5b3d2e53527ca9168
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Sep 8 20:50:10 2020 +0200
fix index reference
---
server/endpoints/email.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/endpoints/email.py b/server/endpoints/email.py
index 5e2336f..69a696f 100644
--- a/server/endpoints/email.py
+++ b/server/endpoints/email.py
@@ -62,7 +62,7 @@ async def process(
] = f"attachment; filename=\"{entry.get('filename')}\""
try:
attachment = await session.database.get(
- itype="attachment", id=indata.get("file")
+ index=session.database.dbs.attachment, id=indata.get("file")
)
if attachment:
blob = base64.decodebytes(
[incubator-ponymail-foal] 01/02: only catch DBError (doc not found)
Posted by hu...@apache.org.
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 80f303ea723287a581c826324798272c8ef6260d
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Tue Sep 8 20:49:26 2020 +0200
only catch DBError (doc not found)
---
server/endpoints/email.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/endpoints/email.py b/server/endpoints/email.py
index 767e17a..5e2336f 100644
--- a/server/endpoints/email.py
+++ b/server/endpoints/email.py
@@ -21,6 +21,7 @@
import plugins.server
import plugins.session
import plugins.mbox
+import plugins.database
import aiohttp.web
import plugins.aaa
import base64
@@ -70,8 +71,8 @@ async def process(
return aiohttp.web.Response(
headers=headers, status=200, body=blob
)
- except Exception as e:
- print(e) # TODO report error
+ except plugins.database.DBError:
+ pass # attachment not found
return aiohttp.web.Response(
headers={}, status=404, text="Attachment not found"
)