Revert "Fix crashing console-log"

This reverts commit d272d6f3df. This
worked around a misconfigured environment by forcing stdout to use
UTF-8. This is kind of a hack and it only works in Python 2, breaking
Python 3 [1].

The correct solution to this issue and all Python 2 unicode print issues
is to correctly configuring LC_ALL to use a UTF-8 locale.


Change-Id: Iaeec1e74262a35f3de3c81f7013835a6aa6f9029
Closes-Bug: #1823287
This commit is contained in:
Stephen Finucane 2019-04-05 07:49:38 +01:00
parent df8e10ccc8
commit a9b1125f7b
1 changed files with 1 additions and 5 deletions

View File

@ -19,7 +19,6 @@
from __future__ import print_function
import argparse
import codecs
import collections
import datetime
import getpass
@ -2750,10 +2749,7 @@ def do_console_log(cs, args):
"""Get console log output of a server."""
server = _find_server(cs, args.server)
data = server.get_console_output(length=args.length)
if data and data[-1] != '\n':
data += '\n'
@utils.arg('server', metavar='<server>', help=_('Name or ID of server.'))