diff options
author | Cole Robinson <crobinso@redhat.com> | 2017-05-05 14:16:59 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2017-05-05 14:52:37 -0400 |
commit | 55288c4551f240dcb25145d068bfd73e3ad796e4 (patch) | |
tree | 59ee9a6513f50e910a0a443f4547a9eb70caa6ae /virtinst/cli.py | |
parent | 34c193108c3fb8ecad78bd092c554ee0accea365 (diff) | |
download | virt-manager-55288c4551f240dcb25145d068bfd73e3ad796e4.tar.gz |
Convert to python3 style print() syntax
Use __future__ imports to keep this working for python2
Diffstat (limited to 'virtinst/cli.py')
-rw-r--r-- | virtinst/cli.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/virtinst/cli.py b/virtinst/cli.py index 7852f1d6..92c68d18 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -19,6 +19,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. +from __future__ import print_function + import argparse import collections import logging @@ -321,12 +323,12 @@ def fail(msg, do_exit=True): def print_stdout(msg, do_force=False): if do_force or not get_global_state().quiet: - print msg + print(msg) def print_stderr(msg): logging.debug(msg) - print >> sys.stderr, msg + print(msg, file=sys.stderr) def _fail_exit(): @@ -1101,10 +1103,10 @@ class VirtCLIParser(object): """ Print out all _param names, triggered via ex. --disk help """ - print "--%s options:" % cls.cli_arg_name + print("--%s options:" % cls.cli_arg_name) for arg in sorted(cls._virtargs, key=lambda p: p.cliname): - print " %s" % arg.cliname - print + print(" %s" % arg.cliname) + print() def __init__(self, guest, optstr): |