Skip to content

Commit aa20be5

Browse files
ktfsawenzel
authored andcommitted
Make code checker python3 compatible
1 parent 7bd8706 commit aa20be5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utility/ThinCompilationsDatabase.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ def modifyCompileCommand(command):
9898
def matchesHeader(line, header):
9999
expression=".*\.h"
100100
# make this more efficient by compiling the expression
101-
return re.match(expression, line) is not None
101+
try:
102+
return re.match(expression, line.decode("utf-8")) is not None
103+
except:
104+
return re.match(expression, line) is not None
105+
102106

103107
def queryListOfHeaders(command):
104108
proc=subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

0 commit comments

Comments
 (0)