Skip to content
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

Merged
merged 1 commit into from Jul 31, 2019

Conversation

tchaikov
Copy link
Contributor

Signed-off-by: Kefu Chai kchai@redhat.com

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

@@ -34,7 +36,7 @@
def humanify_command(command):
out = [command['prefix']]

for arg, val in command.iteritems():
for arg, val in six.iteritems(command):
Copy link
Contributor

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

Suggested change
for arg, val in six.iteritems(command):
for arg, val in command.items():

instead.

Copy link
Contributor Author

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>
@tchaikov
Copy link
Contributor Author

@sebastian-philipp updated and repushed.

@sebastian-philipp
Copy link
Contributor

(still approve)

@tchaikov tchaikov changed the title pybind/mgr/restful: use six.iteritems() for py3 compatible pybind/mgr/restful: use dict.items() for py3 compatible Jul 29, 2019
@liewegas liewegas merged commit a46292b into ceph:master Jul 31, 2019
liewegas added a commit that referenced this pull request Jul 31, 2019
* refs/pull/29356/head:
	pybind/mgr/restful: use dict.items() for py3 compatibility

Reviewed-by: Sebastian Wagner <swagner@suse.com>
@tchaikov tchaikov deleted the wip-mgr/restful branch July 31, 2019 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants