From: Wei Liu Date: Mon, 1 Apr 2019 10:39:00 +0000 (+0100) Subject: tools/xenmon: make xenmon.py compatible with python 2 and 3 X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~2424 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d96a4d6c9cb57bdc46501880c908ae85197243da;p=xen.git tools/xenmon: make xenmon.py compatible with python 2 and 3 Signed-off-by: Wei Liu Acked-by: Andrew Cooper --- 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 . ##################################################################### +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__":