williamh/pybugz — pull request #67 by laomaiweng (2014-09-17 00:50:13+00:00)
Title: bugz/cli.py: update passwordcmd processing for Python 3

Python3's `Popen.communicate()` returns bytes instead of a string, thus
`.split('\n')` throws an error: the argument should be bytes (`.split(b'\n')`),
not a string.
Instead, rely on `bytes.splitlines()` which is more generic and has the added
advantage that it doesn't require any arguments.

(Note: I only replaced `split('\n')` with `splitlines()` in the passwordcmd
handling code, but it might be worth it to apply this replacement everywhere
where `split('\n')` is used, as it's usually what's really intended and it
deals correctly with weird newline sequences.)