Use shutil to support tmp on a separate filesystem

pull/35/head
Jay Kamat 6 years ago
parent d3c3beff94
commit 433f1fa863
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

@ -3,6 +3,7 @@
# * Imports
import os
import shutil
import subprocess
import sys
import multiprocessing
@ -130,7 +131,7 @@ def save_screenshot(css):
# Compress with pngcrush
_, tempfile_path = mkstemp(suffix=".png")
subprocess.check_output(["pngcrush", screenshot_path, tempfile_path], stderr=subprocess.DEVNULL)
os.replace(tempfile_path, screenshot_path)
shutil.move(tempfile_path, screenshot_path)
print(screenshot_path)

@ -0,0 +1 @@
https://en.wikipedia.org/wiki/Tar_(computing)
Loading…
Cancel
Save