Chromium Code Reviews| 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() |
|
Stephen White
2013/05/30 20:34:16
IIRC, the reason I used a temp file is that if the
epoger
2013/05/31 03:54:06
Thanks for the explanation... although, if you run
|
| - ret = self._Call(cmd, stdout=temp) |
| + cmd = [ 'curl', '--fail', '--silent', url, '--output', outfilename ] |
| + 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) |