From 811d7a8ba7208f8c67f094b866d796161d10ff4e Mon Sep 17 00:00:00 2001 From: Paul Mandel Date: Fri, 2 Aug 2019 20:04:36 -0700 Subject: [PATCH] Fixing bug when params is none --- .../googlesamples/assistant/grpc/device_helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/google-assistant-sdk/googlesamples/assistant/grpc/device_helpers.py b/google-assistant-sdk/googlesamples/assistant/grpc/device_helpers.py index 22930c5..f8a1c67 100644 --- a/google-assistant-sdk/googlesamples/assistant/grpc/device_helpers.py +++ b/google-assistant-sdk/googlesamples/assistant/grpc/device_helpers.py @@ -91,7 +91,10 @@ def dispatch_command(self, command, params=None): """Dispatch device commands to the appropriate handler.""" try: if command in self.handlers: - self.handlers[command](**params) + if params: + self.handlers[command](**params) + else: + self.handlers[command]() else: logging.warning('Unsupported command: %s: %s', command, params)