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>
This commit is contained in:
parent
1ff5262124
commit
2e4d3d518e
2 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import hashlib, os, subprocess, sys
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
'redo-ifchange',
|
'redo-ifchange',
|
||||||
sys.argv[2],
|
sys.argv[2],
|
||||||
])
|
], close_fds=False)
|
||||||
|
|
||||||
h = hashlib.sha256()
|
h = hashlib.sha256()
|
||||||
f = open(sys.argv[2])
|
f = open(sys.argv[2])
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""Generate a docker 1.0-style manifest for a docker image."""
|
"""Generate a docker 1.0-style manifest for a docker image."""
|
||||||
import json, os, subprocess, sys, time
|
import json, os, sys, time
|
||||||
|
|
||||||
j = json.load(open('template.json'))
|
j = json.load(open('template.json'))
|
||||||
layerid = open(sys.argv[1] + '.list.sha256').read().strip()
|
layerid = open(sys.argv[1] + '.list.sha256').read().strip()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue