sgh7 / chrome_utils

Linux command-line utilities for Google's Chromium browser
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

CI test fails with TypeError: 'str' does not support the buffer interface #9

Closed sgh7 closed 9 years ago

sgh7 commented 9 years ago

The Linux process mock code in the MockProcess class generates strings that are to be used as the contents of the /proc/<PID>/cmdline and /proc/<PID>/status files. These strings are passed to the io.BytesIO() constructor in the mock of open(). This works in Python 2.7 but not in Python 3.x.

sgh7 commented 9 years ago

Using io.StringIO instead of io.BytesIO.