diff options
| author | Matthew Sherborne <msherborne@gmail.com> | 2013-05-05 10:02:41 +1000 |
|---|---|---|
| committer | Matthew Sherborne <msherborne@gmail.com> | 2013-05-06 10:58:09 +1000 |
| commit | b82ee07c5de59b74a55cf52501c484645ef82768 (patch) | |
| tree | f77a140b13ce578d25a2275ae358461c257e4773 /nova/openstack | |
| parent | 9fda1e3d27e9f6c499a43396dfc71a47cb88e047 (diff) | |
| download | nova-b82ee07c5de59b74a55cf52501c484645ef82768.tar.gz nova-b82ee07c5de59b74a55cf52501c484645ef82768.tar.xz nova-b82ee07c5de59b74a55cf52501c484645ef82768.zip | |
Sync oslo-incubator print statement changes
Just changes openstack.common to use the new print statements.
This is in preparation for another sync coming shortly for the
scheduler library.
Change-Id: I17a86ef87f3253d6bb756cbd40a3ff5df9be23ff
Diffstat (limited to 'nova/openstack')
| -rw-r--r-- | nova/openstack/common/eventlet_backdoor.py | 12 | ||||
| -rw-r--r-- | nova/openstack/common/setup.py | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/nova/openstack/common/eventlet_backdoor.py b/nova/openstack/common/eventlet_backdoor.py index c0ad460fe..57b89ae91 100644 --- a/nova/openstack/common/eventlet_backdoor.py +++ b/nova/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(): diff --git a/nova/openstack/common/setup.py b/nova/openstack/common/setup.py index ba6b54aff..03b06757a 100644 --- a/nova/openstack/common/setup.py +++ b/nova/openstack/common/setup.py @@ -20,6 +20,8 @@ Utilities with minimum-depends for use in setup.py """ +from __future__ import print_function + import email import os import re @@ -232,7 +234,7 @@ def get_cmdclass(): builders = ['html', 'man'] def generate_autoindex(self): - print "**Autodocumenting from %s" % os.path.abspath(os.curdir) + print("**Autodocumenting from %s" % os.path.abspath(os.curdir)) modules = {} option_dict = self.distribution.get_option_dict('build_sphinx') source_dir = os.path.join(option_dict['source_dir'][1], 'api') @@ -257,7 +259,7 @@ def get_cmdclass(): values = dict(module=module, heading=heading, underline=underline) - print "Generating %s" % output_filename + print("Generating %s" % output_filename) with open(output_filename, 'w') as output_file: output_file.write(_rst_template % values) autoindex.write(" %s.rst\n" % module) |
