mirror of
https://github.com/openzim/zimit.git
synced 2025-12-31 04:23:15 +00:00
Always append to log files.
This commit is contained in:
parent
df2d0ccada
commit
6c1f22ae96
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ import subprocess
|
|||
def spawn(cmd, logfile=None):
|
||||
"""Quick shortcut to spawn a command on the filesystem"""
|
||||
if logfile is not None:
|
||||
with open(logfile, "w") as f:
|
||||
with open(logfile, "a+") as f:
|
||||
prepared_cmd = shlex.split("stdbuf -o0 %s" % cmd)
|
||||
process = subprocess.Popen(prepared_cmd, stdout=f)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue