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/03/29 13:31:27 UTC

[incubator-ponymail-foal] branch master updated (7687879 -> 2080aa5)

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 7687879  switch out logo with foal one
     new d3fad02  fix type test warnings, remote can be none
     new 2080aa5  Fix response type

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/mgmt.py  | 3 ++-
 server/plugins/session.py | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

[incubator-ponymail-foal] 02/02: Fix response type

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 2080aa5e095ceea714391ef7309c71f5c3f6bb4f
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Mar 29 15:31:12 2021 +0200

    Fix response type
---
 server/endpoints/mgmt.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/endpoints/mgmt.py b/server/endpoints/mgmt.py
index f81394a..d5ecbc1 100644
--- a/server/endpoints/mgmt.py
+++ b/server/endpoints/mgmt.py
@@ -28,7 +28,7 @@ import time
 
 async def process(
     server: plugins.server.BaseServer, session: plugins.session.SessionObject, indata: dict,
-) -> typing.Optional[dict]:
+) -> typing.Union[dict, aiohttp.web.Response]:
     action = indata.get("action")
     docs = indata.get("documents", [])
     doc = indata.get("document")
@@ -62,6 +62,7 @@ async def process(
                 )
                 delcount += 1
         return aiohttp.web.Response(headers={}, status=200, text=f"Removed {delcount} emails from archives.")
+    return aiohttp.web.Response(headers={}, status=404, text=f"Unknown mgmt command requested")
 
 
 def register(server: plugins.server.BaseServer):

[incubator-ponymail-foal] 01/02: fix type test warnings, remote can be none

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 d3fad0210d2d3594ce9d510d4b5a35929aceb904
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Mar 29 15:27:06 2021 +0200

    fix type test warnings, remote can be none
---
 server/plugins/session.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins/session.py b/server/plugins/session.py
index b10c8f3..8d425d1 100644
--- a/server/plugins/session.py
+++ b/server/plugins/session.py
@@ -129,7 +129,7 @@ async def get_session(
     # If not in local memory, start a new session object
     session = SessionObject(server)
     session.database = await server.dbpool.get()
-    session.remote = request.remote
+    session.remote = request.remote or "??"
 
     # If a cookie was supplied, look for a session object in ES
     if session_id and session.database: