All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH] tools/xenmon: make xenmon.py compatible with python 2 and 3
Date: Mon, 1 Apr 2019 11:39:00 +0100	[thread overview]
Message-ID: <20190401103900.17269-1-wei.liu2@citrix.com> (raw)

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/xenmon/xenmon.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/xenmon/xenmon.py b/tools/xenmon/xenmon.py
index 2a948cd48a..175eacd2cb 100644
--- a/tools/xenmon/xenmon.py
+++ b/tools/xenmon/xenmon.py
@@ -23,6 +23,8 @@
 #   along with this program; If not, see <http://www.gnu.org/licenses/>.
 #####################################################################
 
+from __future__ import print_function
+
 import mmap
 import struct
 import os
@@ -248,8 +250,8 @@ def display(scr, row, col, str, attr=0):
         scr.keypad(0)
         _c.echo()
         _c.endwin()
-        print "Your terminal screen is not big enough; Please resize it."
-        print "row=%d, col=%d, str='%s'" % (row, col, str)
+        print("Your terminal screen is not big enough; Please resize it.")
+        print("row=%d, col=%d, str='%s'" % (row, col, str))
         sys.exit(1)
 
 
@@ -704,7 +706,7 @@ def main():
         try:
             writelog()
         except:
-            print 'Quitting.'
+            print('Quitting.')
     stop_xenbaked()
 
 if __name__ == "__main__":
-- 
2.20.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-04-01 10:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 10:39 Wei Liu [this message]
2019-04-01 10:53 ` [PATCH] tools/xenmon: make xenmon.py compatible with python 2 and 3 Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190401103900.17269-1-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.