PY2/3 get_contents() was returning empty string instead of empty bytes when file...
authorWilliam Deegan <bill@baddogconsulting.com>
Thu, 24 Aug 2017 22:19:14 +0000 (15:19 -0700)
committerWilliam Deegan <bill@baddogconsulting.com>
Thu, 24 Aug 2017 22:19:14 +0000 (15:19 -0700)
src/engine/SCons/Node/__init__.py
src/engine/SCons/Tool/qt.py

index 0409d3b23851bb14beb381280738fa9049532cfc..e1867522564f2b7995d66ad99cedbb496875fb34 100644 (file)
@@ -211,7 +211,7 @@ def get_contents_dir(node):
 
 def get_contents_file(node):
     if not node.rexists():
-        return ''
+        return b''
     fname = node.rfile().get_abspath()
     try:
         with open(fname, "rb") as fp:
index 5f99054f0464f25731185740e8b8661850dd0163..77269a8339c3d0ab2eaa69b1a2d3c91a5de5b3ea 100644 (file)
@@ -144,6 +144,8 @@ class _Automoc(object):
                 # c or fortran source
                 continue
             #cpp_contents = comment.sub('', cpp.get_text_contents())
+            if debug:
+                print("scons: qt: Getting contents of %s" % cpp)
             cpp_contents = cpp.get_text_contents()
             h=None
             for h_ext in header_extensions: