]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Use future print for python3 compatibility
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 7 Oct 2019 09:48:25 +0000 (11:48 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 7 Oct 2019 09:54:32 +0000 (11:54 +0200)
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
teuthology/__init__.py

index 591c92e6c2ac984ef64aa901e6cc3b090672158c..9c7b78b6e0e19da457a59728d93f4b1e0a328e67 100644 (file)
@@ -1,4 +1,6 @@
+from __future__ import print_function
 import os
+
 # Tell gevent not to patch os.waitpid() since it is susceptible to race
 # conditions. See:
 # http://www.gevent.org/gevent.monkey.html#gevent.monkey.patch_os
@@ -41,7 +43,7 @@ try:
     ).strip()
 except Exception as e:
     # before logging; should be unusual
-    print >>sys.stderr, 'Can\'t get version from git rev-parse', e
+    print("Can't get version from git rev-parse %s" % e, file=sys.stderr)
 
 # If we are running inside a virtualenv, ensure we have its 'bin' directory in
 # our PATH. This doesn't happen automatically if scripts are called without