From 767b502b6d3158b0f8ab7b735c24e3863c7b9eba Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Tue, 12 Oct 2021 23:58:12 -0400 Subject: [PATCH] executors: fix returning `str` instead of `bytes` from `get_compile_output` --- dmoj/executors/CBL.py | 2 +- dmoj/executors/PAS.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dmoj/executors/CBL.py b/dmoj/executors/CBL.py index 343984385..33cd52d08 100644 --- a/dmoj/executors/CBL.py +++ b/dmoj/executors/CBL.py @@ -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'' diff --git a/dmoj/executors/PAS.py b/dmoj/executors/PAS.py index 5a1b876b1..d3d6b25d7 100644 --- a/dmoj/executors/PAS.py +++ b/dmoj/executors/PAS.py @@ -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):