diff mbox series

[02/14] backports: cmake: Fixes for python3

Message ID 20211011222227.1189850-3-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Remove support for kernel < 4.4 | expand

Commit Message

Hauke Mehrtens Oct. 11, 2021, 10:22 p.m. UTC
Make ckmake work with python3.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 devel/ckmake | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/devel/ckmake b/devel/ckmake
index d16de3a7..9252df84 100755
--- a/devel/ckmake
+++ b/devel/ckmake
@@ -20,7 +20,7 @@  import subprocess
 import sys
 import signal
 
-from Queue import Queue
+from queue import Queue
 from threading import Thread, Lock
 from shutil import copytree, ignore_patterns, rmtree, copyfileobj
 from time import sleep
@@ -232,7 +232,6 @@  def cpu_info_build_jobs():
 
 def kill_curses():
     curses.endwin()
-    sys.stdout = os.fdopen(0, 'w', 0)
 
 
 def sig_handler(signal, frame):
@@ -643,10 +642,10 @@  if __name__ == "__main__":
             target_kranges.append(krange)
 
     if not os.path.exists(modules):
-        print "%s does not exist" % (modules)
+        print ("%s does not exist" % (modules))
         sys.exit(1)
     if not os.path.exists(my_cwd + '/Makefile'):
-        print "%s does not exist" % (my_cwd + '/Makefile')
+        print ("%s does not exist" % (my_cwd + '/Makefile'))
         sys.exit(1)
     if os.path.exists(ckmake_log):
         os.remove(ckmake_log)