diff options
author | Chuck Short <chuck.short@canonical.com> | 2013-05-01 09:40:43 -0500 |
---|---|---|
committer | Chuck Short <chuck.short@canonical.com> | 2013-05-02 08:06:01 -0500 |
commit | 2f771aca390639cc49f71c451bd55c1d10db6f58 (patch) | |
tree | 5873dda954d351f5522a7451acb1215b7c85ab7c /openstack/common/eventlet_backdoor.py | |
parent | 90e83530d4dc49d570fa05ea63a93805717dcfa0 (diff) | |
download | oslo-2f771aca390639cc49f71c451bd55c1d10db6f58.tar.gz oslo-2f771aca390639cc49f71c451bd55c1d10db6f58.tar.xz oslo-2f771aca390639cc49f71c451bd55c1d10db6f58.zip |
Improve python3 compatibility
Change print statements so that it works with python3
as well.
Change-Id: Iff16b62e4b875c79862c9af7726ea77627aa7b4f
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'openstack/common/eventlet_backdoor.py')
-rw-r--r-- | openstack/common/eventlet_backdoor.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/openstack/common/eventlet_backdoor.py b/openstack/common/eventlet_backdoor.py index c0ad460..57b89ae 100644 --- a/openstack/common/eventlet_backdoor.py +++ b/openstack/common/eventlet_backdoor.py @@ -16,6 +16,8 @@ # License for the specific language governing permissions and limitations # under the License. +from __future__ import print_function + import gc import pprint import sys @@ -37,7 +39,7 @@ CONF.register_opts(eventlet_backdoor_opts) def _dont_use_this(): - print "Don't use this, just disconnect instead" + print("Don't use this, just disconnect instead") def _find_objects(t): @@ -46,16 +48,16 @@ def _find_objects(t): def _print_greenthreads(): for i, gt in enumerate(_find_objects(greenlet.greenlet)): - print i, gt + print(i, gt) traceback.print_stack(gt.gr_frame) - print + print() def _print_nativethreads(): for threadId, stack in sys._current_frames().items(): - print threadId + print(threadId) traceback.print_stack(stack) - print + print() def initialize_if_enabled(): |