Page MenuHomePhabricator

Create Python library `seven` in

Authored by zturner on Oct 28 2015, 3:23 PM.



The purpose of this file is to fill in the gaps where six is lacking support for some operation that we need.

Initially this just provides a replacement for the commands module which is no longer present in Python 3.

Diff Detail

Event Timeline

zturner updated this revision to Diff 38692.Oct 28 2015, 3:23 PM
zturner retitled this revision from to Create Python library `seven` in
zturner updated this object.
zturner added a reviewer: tfiala.
zturner added a subscriber: lldb-commits.
tfiala edited edge metadata.Oct 28 2015, 8:37 PM

Just one question on the python 3 return code for non-exceptional exit.


Is it correct to assume a 0 return code here? Couldn't we have output and have a non-zero status return that ins't a call exception?

zturner added inline comments.Oct 28 2015, 10:50 PM

The documentation of check_output says this:

Run command with arguments and return its output as a byte string.

If the return code was non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute and any output in the output attribute.

So I think it's correct. Might not hurt to have a comment to that effect though

tfiala accepted this revision.Oct 29 2015, 7:08 AM
tfiala edited edge metadata.

OK looks good then.

This revision is now accepted and ready to land.Oct 29 2015, 7:08 AM
tfiala added a comment.Nov 4 2015, 9:30 AM

I think this went in, right?

zturner closed this revision.Nov 4 2015, 9:35 AM