From dfb0e3e3c1b5b5563279bebfe222ed4762f79494 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 3 Jul 2013 18:12:58 -0500 Subject: Begin Python 3 compatability * use six.iteritems() * replace basestring with six.string_types * convert print statements to functions (they're all debugging and should be removed eventually anyway) * clean up OpenStack copyright: LLC -> Foundation Change-Id: Icb14212bcb408e63816bfec3922a697bc1a6c946 --- openstackclient/identity/v3/role.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'openstackclient/identity/v3/role.py') diff --git a/openstackclient/identity/v3/role.py b/openstackclient/identity/v3/role.py index 9be3b784..5403d4cb 100644 --- a/openstackclient/identity/v3/role.py +++ b/openstackclient/identity/v3/role.py @@ -1,4 +1,4 @@ -# Copyright 2012-2013 OpenStack, LLC. +# Copyright 2012-2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain @@ -16,6 +16,7 @@ """Identity v3 Role action implementations""" import logging +import six import sys from cliff import command @@ -123,7 +124,7 @@ class CreateRole(show.ShowOne): identity_client = self.app.client_manager.identity role = identity_client.roles.create(parsed_args.name) - return zip(*sorted(role._info.iteritems())) + return zip(*sorted(six.iteritems(role._info))) class DeleteRole(command.Command): @@ -296,4 +297,4 @@ class ShowRole(show.ShowOne): role = utils.find_resource(identity_client.roles, parsed_args.role) - return zip(*sorted(role._info.iteritems())) + return zip(*sorted(six.iteritems(role._info))) -- cgit v1.2.1