kgiusti commented on a change in pull request #676: DISPATCH-1518: Added ability to turn on protocol frame trace logging … URL: https://github.com/apache/qpid-dispatch/pull/676#discussion_r377654544
########## File path: python/qpid_dispatch/management/client.py ########## @@ -76,6 +76,16 @@ def delete(self): class Node(object): """Client proxy for an AMQP management node""" + def clean_attrs(self, attrs): + BOOL_VALUES = {"yes": 1, "true": 1, "on": 1, "no": 0, "false": 0, + "off": 0} + if isinstance(attrs, dict): + for key in attrs.keys(): + if attrs[key] in BOOL_VALUES.keys(): + attrs[key] = bool(BOOL_VALUES[attrs[key]]) Review comment: Instead of putting 1 or 0 as the values for BOOL_VALUES, why not use the python bools True and False? Then you don't need to cast to bool() ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org