close_fds=True by default
This commit is contained in:
parent
0bd359f89d
commit
2cd77e07a2
5 changed files with 13 additions and 14 deletions
|
|
@ -10,7 +10,7 @@ import subprocess
|
|||
def cover(path):
|
||||
image = tempfile.mkstemp('.jpg')[1]
|
||||
cmd = ['python2', 'static/txt.js/txt.py', '-i', path, '-o', image]
|
||||
p = subprocess.Popen(cmd)
|
||||
p = subprocess.Popen(cmd, close_fds=True)
|
||||
p.wait()
|
||||
with open(image, 'rb') as fd:
|
||||
data = fd.read()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue