Skip to content

Commit

Permalink
Fix Method.get_response for Post request with no parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
c-mita committed Jun 21, 2016
1 parent d384735 commit 71b14d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion malcolm/core/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ def get_response(self, request):
"""
self.log_debug("Received request %s", request)
try:
result = self(**request.parameters)
if hasattr(request, "parameters"):
result = self(**request.parameters)
else:
result = self()
except Exception as error:
# TODO: python3 no longer has error.message, but error.args[0]
# seems the same. Is this always right?
Expand Down

0 comments on commit 71b14d8

Please sign in to comment.