Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executors: fix returning str instead of bytes from get_compile_output #960

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dmoj/executors/CBL.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ def get_compile_output(self, process):
for prefix in (b'Error:', b'Note:', b'Warning:'):
if prefix in output or prefix.lower() in output:
return output
return ''
return b''
2 changes: 1 addition & 1 deletion dmoj/executors/PAS.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_compile_args(self):

def get_compile_output(self, process):
output = super().get_compile_output(process)
return output if b'Fatal:' in output or b'Warning:' in output or b'Note:' in output else ''
return output if b'Fatal:' in output or b'Warning:' in output or b'Note:' in output else b''

@classmethod
def get_version_flags(cls, command):
Expand Down