Commit graph

3 commits

Author SHA1 Message Date
Avery Pennarun
fb0a5bd69c Fix more problems with "/usr/bin/env python" picking python3.
Open files in 'rb' (read binary) mode to prevent useless default utf8
encoding in python3, without breaking python2 compatibility.

Reported-by: Tharre <tharre3@gmail.com>
2019-05-15 16:54:21 -07:00
Avery Pennarun
2e4d3d518e cookbook/container/default.sha256.do: use explicit close_fds=False.
Some people have /usr/bin/python as a link to python3. The script is
designed to work in either python2 or python3, but python3's subprocess
model defaults to close_fds=True, which closes the jobserver fds and
causes an error.  Explicitly force close_fds=False to get identical
behaviour on python2 and python3.

Reported-by: Tharre <tharre3@gmail.com>
2019-05-15 15:19:06 -07:00
Avery Pennarun
3923a7d3f8 cookbook/container: example of building+running docker containers.
This got... long... and complicated.  But I think it's a really good
demonstration of getting redo to do complicated things elegantly.  At
least, I hope it is.
2019-01-08 01:42:33 -05:00