Skip to content

Commit

Permalink
fix prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
abersheeran committed Jul 20, 2020
1 parent a274df5 commit 44846e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rpcpy/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ def __init__(
serializer: BaseSerializer = JSONSerializer(),
):
assert mode in ("WSGI", "ASGI"), "mode must be in ('WSGI', 'ASGI')"
assert prefix.startswith("/") and prefix.endswith("/")
self.callbacks: typing.Dict[str, typing.Callable] = {}
self.prefix = "/" + prefix.strip("/") + "/"
self.prefix = prefix
self.serializer = serializer

def register(self, func: Function) -> Function:
Expand Down

0 comments on commit 44846e2

Please sign in to comment.