[jhbuild/more-py3-fixes: 5/6] cmds: fix a str to bytes comparison



commit 77b7d36a2a3e4c61863fc79abb3ebdeb20de1e4e
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Tue Sep 24 19:09:19 2019 +0200

    cmds: fix a str to bytes comparison
    
    This is always false with Python3. This resulted in builds getting
    stuck and the interpreter using 100% CPU.

 jhbuild/utils/cmds.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/jhbuild/utils/cmds.py b/jhbuild/utils/cmds.py
index 1d9b17a5..52fd2986 100644
--- a/jhbuild/utils/cmds.py
+++ b/jhbuild/utils/cmds.py
@@ -197,7 +197,7 @@ def pprint_output(pipe, format_line):
 
             if pipe.stderr in rlist:
                 err_chunk = os.read(pipe.stderr.fileno(), 10000)
-                if err_chunk == '':
+                if err_chunk == b'':
                     pipe.stderr.close()
                     read_set.remove(pipe.stderr)
                 err_data += err_chunk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]