Index: tools/rebaseline.py |
=================================================================== |
--- tools/rebaseline.py (revision 9354) |
+++ tools/rebaseline.py (working copy) |
@@ -17,7 +17,6 @@ |
import os |
import subprocess |
import sys |
-import tempfile |
# Mapping of gm-expectations subdir (under |
# https://skia.googlecode.com/svn/gm-expected/ ) |
@@ -76,12 +75,10 @@ |
os.path.exists(os.path.join(os.pardir, '.git'))) |
# Execute subprocess.call(), unless dry_run is True |
- def _Call(self, cmd, stdout=None): |
+ def _Call(self, cmd): |
if self._dry_run: |
print '%s' % ' '.join(cmd) |
return 0 |
- if stdout: |
- return subprocess.call(cmd, stdout=stdout) |
else: |
return subprocess.call(cmd) |
@@ -91,14 +88,11 @@ |
url = ('http://skia-autogen.googlecode.com/svn/gm-actual/' + |
expectations_subdir + '/' + builder_name + '/' + |
expectations_subdir + '/' + infilename) |
- cmd = [ 'curl', '--fail', '--silent', url ] |
- temp = tempfile.NamedTemporaryFile() |
- ret = self._Call(cmd, stdout=temp) |
+ cmd = [ 'curl', '--fail', '--silent', url, '--output', outfilename ] |
epoger
2013/05/30 19:44:12
Patchset 1 changes the "curl" command so that a te
|
+ ret = self._Call(cmd) |
if ret != 0: |
print '# Couldn\'t fetch ' + url |
return |
- cmd = [ 'cp', temp.name, outfilename ] |
- self._Call(cmd); |
if self._is_svn_checkout: |
cmd = [ 'svn', 'add', '--quiet', outfilename ] |
self._Call(cmd) |