comparison tests/run-tests.py @ 26087:06cd67a5044f

run-tests: ignore failed removal of nonexistent installerrs When running tests with -j100 or so on a large machine, I see this os.remove call failing semi-regularly. Since it's not really a problem when the file is already gone, just suppress the error in that case.
author Augie Fackler <augie@google.com>
date Tue, 25 Aug 2015 00:40:42 -0400
parents c380d5273e91
children bad09bd22b6a
comparison
equal deleted inserted replaced
26086:3670efdc7088 26087:06cd67a5044f
2076 makedirs(self._bindir) 2076 makedirs(self._bindir)
2077 2077
2078 vlog("# Running", cmd) 2078 vlog("# Running", cmd)
2079 if os.system(cmd) == 0: 2079 if os.system(cmd) == 0:
2080 if not self.options.verbose: 2080 if not self.options.verbose:
2081 os.remove(installerrs) 2081 try:
2082 os.remove(installerrs)
2083 except OSError as e:
2084 if e.errno != errno.ENOENT:
2085 raise
2082 else: 2086 else:
2083 f = open(installerrs, 'rb') 2087 f = open(installerrs, 'rb')
2084 for line in f: 2088 for line in f:
2085 if PYTHON3: 2089 if PYTHON3:
2086 sys.stdout.buffer.write(line) 2090 sys.stdout.buffer.write(line)