canonical / canonical/pycloudlib

Can't use `.execute` expecting non-utf-8 output

Open
#393 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
22
Forks
42
PR merge metrics
No merged PRs in 30d

Description

The instance `execute` method calls ends up (in `_ssh`) calling `.decode('utf-8')` in the output of the command which is executed. Because decode is being strict, this raises an error if the command returns non-utf-8.

Although I understand UTF-8 can be the default decoder, we could make use of an option either to ignore/replace errors, or to specify a different decoder.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.