Commit e9b7150b by Tom 'Biwaa' Riat Committed by GitHub

Merge pull request #612 from wismill/master

Replace os.rename with shutil.move
parents 38f9609f b1e7b3a8
from __future__ import unicode_literals
import os
import shutil
import subprocess
from tempfile import NamedTemporaryFile
......@@ -146,6 +147,6 @@ class SubProcessCompiler(CompilerBase):
# Decide what to do with captured stdout.
if stdout:
if stdout_captured:
os.rename(stdout.name, os.path.join(cwd or os.curdir, stdout_captured))
shutil.move(stdout.name, os.path.join(cwd or os.curdir, stdout_captured))
else:
os.remove(stdout.name)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment