diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2013-07-03 18:12:58 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2013-07-29 19:12:29 -0500 |
| commit | dfb0e3e3c1b5b5563279bebfe222ed4762f79494 (patch) | |
| tree | 43ec155c36076ba0645d131bde62f7baeaae2ef2 /openstackclient/compute/v2/console.py | |
| parent | 65d2a14e3e834ce0c57c879ec7d42715058254bf (diff) | |
| download | python-openstackclient-dfb0e3e3c1b5b5563279bebfe222ed4762f79494.tar.gz | |
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
Diffstat (limited to 'openstackclient/compute/v2/console.py')
| -rw-r--r-- | openstackclient/compute/v2/console.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openstackclient/compute/v2/console.py b/openstackclient/compute/v2/console.py index a67b004c..8f49c513 100644 --- a/openstackclient/compute/v2/console.py +++ b/openstackclient/compute/v2/console.py @@ -13,9 +13,10 @@ # under the License. # -"""Console action implementations""" +"""Compute v2 Console action implementations""" import logging +import six import sys from cliff import command @@ -106,7 +107,6 @@ class ShowConsoleURL(show.ShowOne): parsed_args.server, ) - print "type: %s" % parsed_args.url_type if parsed_args.url_type in ['novnc', 'xvpvnc']: data = server.get_vnc_console(parsed_args.url_type) if parsed_args.url_type in ['spice']: @@ -114,8 +114,7 @@ class ShowConsoleURL(show.ShowOne): if not data: return ({}, {}) - print "data: %s" % data['console'] info = {} info.update(data['console']) - return zip(*sorted(info.iteritems())) + return zip(*sorted(six.iteritems(info))) |
