Skip to content
Open
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
7 changes: 6 additions & 1 deletion tmux2html/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ def shell_cmd(cmd, ignore_error=False):
if not ignore_error and p.returncode != 0:
print(stderr.decode('utf8'), file=sys.stderr)
sys.exit(1)
return stdout.decode('utf8')
try:
ret = stdout.decode('utf8')
except UnicodeDecodeError as e:
print(e, file=sys.stderr)
ret = "…"
return ret


def get_contents(target, full=False, max_lines=0):
Expand Down