bug 966858 - fix dumpScreen on Windows. r=jmaher

--HG--
extra : rebase_source : 76f87429a657cb24e4fd76398fabb894df987d96
This commit is contained in:
Ted Mielczarek 2014-02-05 09:34:23 -05:00
parent 6300384616
commit e0980e8260

View File

@ -512,11 +512,9 @@ def dumpScreen(utilityPath):
# Run the capture
try:
with mozfile.NamedTemporaryFile(suffix='.png',
prefix='mozilla-test-fail-screenshot_',
dir=parent_dir,
delete=False) as f:
returncode = subprocess.call(utility + [f.name])
tmpfd, imgfilename = tempfile.mkstemp(prefix='mozilla-test-fail-screenshot_', suffix='.png', dir=parent_dir)
os.close(tmpfd)
returncode = subprocess.call(utility + [imgfilename])
except OSError, err:
log.info("Failed to start %s for screenshot: %s",
utility[0], err.strerror)