Skip to content

Commit

Permalink
Fix decode
Browse files Browse the repository at this point in the history
  • Loading branch information
polsala committed Mar 11, 2024
1 parent 2fe16f1 commit 5a4d6b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apply_pr/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import re
import pprint

import six
from fabric.api import local, run, cd, put, settings, abort, sudo, hide, task, env, prefix
from fabric.operations import open_shell, prompt
from fabric.contrib import files
Expand Down Expand Up @@ -274,7 +275,10 @@ def run(self):

def catch_result(self, result):
result_failed = result.failed
result_text = result.decode('utf-8')
if six.PY3:
result_text = bytes(result, 'utf-8').decode('utf-8')
else:
result_text = result.decode('utf-8')
for line in result_text.split('\n'):
if re.match('Applying: ', line):
tqdm.write(colors.green(line))
Expand Down

0 comments on commit 5a4d6b4

Please sign in to comment.