-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pybind/mgr/restful: use dict.items() for py3 compatible #29356
Conversation
src/pybind/mgr/restful/common.py
Outdated
@@ -34,7 +36,7 @@ | |||
def humanify_command(command): | |||
out = [command['prefix']] | |||
|
|||
for arg, val in command.iteritems(): | |||
for arg, val in six.iteritems(command): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is not critical, we might just use
for arg, val in six.iteritems(command): | |
for arg, val in command.items(): |
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am fine with either of these two approaches as long as we don't care about creating a copy of command
in python2.
Signed-off-by: Kefu Chai <kchai@redhat.com>
019444b
to
a46292b
Compare
@sebastian-philipp updated and repushed. |
(still approve) |
* refs/pull/29356/head: pybind/mgr/restful: use dict.items() for py3 compatibility Reviewed-by: Sebastian Wagner <swagner@suse.com>
Signed-off-by: Kefu Chai kchai@redhat.com