From ee38b9d5e83dc4b489cfc44a64052a46c5daec5b Mon Sep 17 00:00:00 2001 From: Ruben van Staveren Date: Sat, 14 Jan 2023 19:41:43 +0100 Subject: [PATCH] Need to decode the subprocess.run bytes to ascii --- jail2ban/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jail2ban/__init__.py b/jail2ban/__init__.py index adbff1e..9491bf6 100644 --- a/jail2ban/__init__.py +++ b/jail2ban/__init__.py @@ -94,7 +94,7 @@ def create_app(): verbose=True) result = [entry.groupdict() for entry in re.finditer(_PFCTL_TABLE_PAT, - '\n'.join(res), + '\n'.join([x.decode('ascii') for x in res]), re.MULTILINE|re.VERBOSE)] return jsonify({'anchor': f'f2b-jail/{remote_user}',