eclipse-zenoh/zenoh-python

[Bug] Query.decode_parameters() does not return dictionary

Closed this issue · 1 comments

Describe the bug

The Query.decode_parameters() method is supposed to return a dictionary containing the parameters passed in via the query string. However, when trying to get a parameter from the returned object, an exception is thrown, indicating that the object has no attribute get.

IMHO this line in the Query class should read

return super().decode_parameters()

To reproduce

  1. register a Queryable with a handler.
  2. In the handler, try to decode the parameters using Query.decode_parameters().
  3. Try to invoke dict.get(key) on the returned object.

System info

  • Zenoh version: 0.6.0-b1
  • Platform: Ubuntu 22.10 on amd64

Thank you for letting us know, your solution is correct, so #85 implements it, fixing the issue :)