diff --git a/devtools/session.py b/devtools/session.py index c539dad2..3038c732 100644 --- a/devtools/session.py +++ b/devtools/session.py @@ -25,9 +25,11 @@ def send_command(self, command, params=None, cb=None): json_command = { "id": self.message_id, "method": command, - "params": params, } + if params: + json_command["params"] = params + if self.session_id != "": json_command["session_id"] = self.session_id