aboutsummaryrefslogtreecommitdiff
path: root/tools/response_file.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-11-11 11:56:51 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-11-11 11:56:51 -0800
commit117f357f9c08fd3297f5c34cdd0a43227079f059 (patch)
tree85f85b3785b2390a3681d497f8849be0447b80c0 /tools/response_file.py
parent0ea99d4659ec686115c70f0b7e67fa829739c1e0 (diff)
parent37d0e6c55f9f48255b5ac34426196ddf6d5072a2 (diff)
Merge branch 'incoming' into f32
Diffstat (limited to 'tools/response_file.py')
-rw-r--r--tools/response_file.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/response_file.py b/tools/response_file.py
index f19cf8af..7f916752 100644
--- a/tools/response_file.py
+++ b/tools/response_file.py
@@ -1,4 +1,5 @@
import tempfile, os, sys, shlex
+import shared
# Routes the given cmdline param list in args into a new response file and returns the filename to it.
# The returned filename has a suffix '.rsp'.
@@ -9,6 +10,11 @@ def create_response_file(args, directory):
args = map(lambda p: p.replace('\\', '\\\\').replace('"', '\\"'), args)
response_fd.write('"' + '" "'.join(args) + '"')
response_fd.close()
+
+ # Register the created .rsp file to be automatically cleaned up once this process finishes, so that
+ # caller does not have to remember to do it.
+ shared.configuration.get_temp_files().note(response_filename)
+
return response_filename
# Reads a response file, and returns the list of cmdline params found in the file.