示例#1
0
 def _get_value(self, stream):
     try:
         return decode_output(stream.getvalue())
     except UnicodeError:
         # Error occurs if non-ASCII chars logged both as str and unicode.
         stream.buf = decode_output(stream.buf)
         stream.buflist = [decode_output(item) for item in stream.buflist]
         return stream.getvalue()
示例#2
0
 def _get_value(self, stream):
     try:
         return decode_output(stream.getvalue())
     except UnicodeError:
         # Error occurs if non-ASCII chars logged both as str and unicode.
         stream.buf = decode_output(stream.buf)
         stream.buflist = [decode_output(item) for item in stream.buflist]
         return stream.getvalue()
示例#3
0
文件: Process.py 项目: Garjy/RIDE
 def _format_output(self, output):
     if output.endswith('\n'):
         output = output[:-1]
     return decode_output(output, force=True)
 def _format_output(self, output):
     if output.endswith('\n'):
         output = output[:-1]
     return decode_output(output, force=True)