Blame SOURCES/0002-Xspice-Use-print-instead-of-print.patch

af55dd
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
af55dd
From: Christophe Fergeau <cfergeau@redhat.com>
af55dd
Date: Wed, 8 Feb 2017 15:23:56 +0100
af55dd
Subject: [PATCH] Xspice: Use print("") instead of print ""
af55dd
af55dd
This allows Xspice to run when using python3 instead of python2
af55dd
---
af55dd
 scripts/Xspice | 16 ++++++++--------
af55dd
 1 file changed, 8 insertions(+), 8 deletions(-)
af55dd
af55dd
diff --git a/scripts/Xspice b/scripts/Xspice
af55dd
index ada99d1..30d10fa 100755
af55dd
--- a/scripts/Xspice
af55dd
+++ b/scripts/Xspice
af55dd
@@ -34,7 +34,7 @@ def which(x):
af55dd
         candidate = os.path.join(p, x)
af55dd
         if os.path.exists(candidate):
af55dd
             return candidate
af55dd
-    print 'Warning: failed to find executable %s' % x
af55dd
+    print('Warning: failed to find executable %s' % x)
af55dd
     return None
af55dd
 
af55dd
 if 'XSPICE_ENABLE_GDB' in os.environ:
af55dd
@@ -128,10 +128,10 @@ args, xorg_args = parser.parse_known_args(sys.argv[1:])
af55dd
 def agents_new_enough(args):
af55dd
     for f in [args.vdagent_exec, args.vdagentd_exec]:
af55dd
         if not f:
af55dd
-            print 'please specify path to vdagent/vdagentd executables'
af55dd
+            print('please specify path to vdagent/vdagentd executables')
af55dd
             return False
af55dd
         if not os.path.exists(f):
af55dd
-            print 'error: file not found ', f
af55dd
+            print('error: file not found ', f)
af55dd
             return False
af55dd
 
af55dd
     for f in [args.vdagent_exec, args.vdagentd_exec]:
af55dd
@@ -169,11 +169,11 @@ def tls_files(args):
af55dd
 # and it isn't supplied spice will still abort, and Xorg with it.
af55dd
 for key, filename in tls_files(args).items():
af55dd
     if not os.path.exists(filename):
af55dd
-        print "missing %s - %s does not exist" % (key, filename)
af55dd
+        print("missing %s - %s does not exist" % (key, filename))
af55dd
         sys.exit(1)
af55dd
 
af55dd
 def error(msg, exit_code=1):
af55dd
-    print "Xspice: %s" % msg
af55dd
+    print("Xspice: %s" % msg)
af55dd
     sys.exit(exit_code)
af55dd
 
af55dd
 if not args.xorg:
af55dd
@@ -319,7 +319,7 @@ for arg in xorg_args:
af55dd
     if arg.startswith(":"):
af55dd
         display = arg
af55dd
 if not display:
af55dd
-    print "Error: missing display on line (i.e. :3)"
af55dd
+    print("Error: missing display on line (i.e. :3)")
af55dd
     raise SystemExit
af55dd
 os.environ ['DISPLAY'] = display
af55dd
 
af55dd
@@ -343,7 +343,7 @@ time.sleep(2)
af55dd
 
af55dd
 retpid,rc = os.waitpid(xorg.pid, os.WNOHANG)
af55dd
 if retpid != 0:
af55dd
-    print "Error: X server is not running"
af55dd
+    print("Error: X server is not running")
af55dd
 else:
af55dd
     if args.vdagent_enabled and args.vdagent_launch:
af55dd
         # XXX use systemd --user for this?
af55dd
@@ -361,4 +361,4 @@ else:
af55dd
         xorg.wait()
af55dd
     except KeyboardInterrupt:
af55dd
         # Catch Ctrl-C as that is the common way of ending this script
af55dd
-        print "Keyboard Interrupt"
af55dd
+        print("Keyboard Interrupt")