mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Changes to convert to unicode at the borders
The module docs and vault changes solve issues where tracebacks can happen. The galaxy changes are mostly refactoring to be more pythonic with a small chance that a unicode traceback could have occurred there without the changes. The change in __init__.py when we actually call the pager makes things more robust but could hide places where we had bytes coming in already so I didn't want to change that without auditing where the text was coming from. Fixes #14178
This commit is contained in:
@@ -459,7 +459,7 @@ class CLI(object):
|
||||
os.environ['LESS'] = CLI.LESS_OPTS
|
||||
try:
|
||||
cmd = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=sys.stdout)
|
||||
cmd.communicate(input=text.encode(sys.stdout.encoding))
|
||||
cmd.communicate(input=to_bytes(text))
|
||||
except IOError:
|
||||
pass
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Reference in New Issue
Block a user