(self, path, contents, force_verbose=False)
| 1315 | return tempfile.NamedTemporaryFile(mode=mode, delete=False) |
| 1316 | |
| 1317 | def WriteFile(self, path, contents, force_verbose=False): |
| 1318 | # This function largely exists so it can be overriden for testing. |
| 1319 | if self.args.dryrun or self.args.verbose or force_verbose: |
| 1320 | self.Print('\nWriting """\\\n%s""" to %s.\n' % (contents, path)) |
| 1321 | with open(path, 'w') as fp: |
| 1322 | return fp.write(contents) |
| 1323 | |
| 1324 | |
| 1325 | class MBErr(Exception): |