Close open file handle before moving file when recording.
commitda3ff86aa88a5de1bd1b35d68b2c2558c42154fa
authorariblue@google.com <ariblue@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 25 Jul 2014 22:13:25 +0000 (25 22:13 +0000)
committerariblue@google.com <ariblue@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 25 Jul 2014 22:13:25 +0000 (25 22:13 +0000)
treeae811e0b371d1707f8e36dcdb4533bdba234d6b4
parentf70a84d4f1408b76c8d0c71764cfc7294bebec72
Close open file handle before moving file when recording.

In record_wpr, we did the following:

  temp_target_wpr_file_path = tempfile.mkstemp()[1]

In python, tempfile.mkstemp() will return a tuple containing the file handle and the file path. Since the script never closes this file handle, it looks like we throw a WindowsError when we try to move the file with the open file handle.

BUG=

Review URL: https://codereview.chromium.org/420893002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285708 0039d316-1c4b-4281-b951-d872f2087c98
tools/telemetry/telemetry/page/page_set_archive_info.py
tools/telemetry/telemetry/page/record_wpr.py