Comment #1 on issue 1626 by [email protected]: Patch for /src/robot/running/outputcapture.py
http://code.google.com/p/robotframework/issues/detail?id=1626

Hi, I'm using robotframework for complicated tests which includes a lots of interaction with 3rd party products as wget, zc.buildout, ... Some of them gives really strange output, so buflist looks like this:

  map(type, self._stream.buflist)
  [<type 'str'>, <type 'unicode'>, <type 'str'>, ... ]

StringIO.getvalue can't possible handle it properly and raises "*** UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 11: ordinal not in range(128)" exception. The normalization of self._stream.buflist before calling getvalue method fix the problem.

I stack with next code to normalize self._stream.buflist:
for num, line in enumerate(self._stream.buflist):
     self._stream.buflist[num] = str(line)  # normalizing stream lines
output = self._stream.getvalue()

instead of:
output = self._stream.getvalue()

Would be just great if you include this solution in robotframework code or write more proper fix for that problem.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to