Chromium Code Reviews| Index: client/run_isolated.py |
| diff --git a/client/run_isolated.py b/client/run_isolated.py |
| index 7c3f063793c8f1356e4ceeb5697043fed212788a..1c18deca8f79159415960cf9a4d6c4c063e626c2 100755 |
| --- a/client/run_isolated.py |
| +++ b/client/run_isolated.py |
| @@ -31,6 +31,7 @@ __version__ = '0.8.5' |
| import base64 |
| import collections |
| +import json |
| import logging |
| import optparse |
| import os |
| @@ -823,10 +824,24 @@ def main(args): |
| print >> sys.stderr, ex.message |
| return 1 |
|
M-A Ruel
2016/10/21 20:15:20
2 lines
aludwin
2016/10/21 20:32:00
Done.
aludwin
2016/10/24 13:33:31
Actually, un-done - see comment above.
|
| +def get_args(args): |
| + if len(args) == 2 and args[0] == '-f': |
| + # If the only args are "-f filename", load those |
| + # instead. |
| + argfile = args[1] |
| + args = [] |
| + try: |
| + f = open(argfile, 'r') |
| + args = json.loads(f.read()) |
| + f.close() |
| + except Exception as e: |
| + print "Couldn't read arguments: %s"%e |
| + return args |
| if __name__ == '__main__': |
| subprocess42.inhibit_os_error_reporting() |
| # Ensure that we are always running with the correct encoding. |
| fix_encoding.fix_encoding() |
| file_path.enable_symlink() |
| - sys.exit(main(sys.argv[1:])) |
| + |
| + sys.exit(main(get_args(sys.argv[1:]))) |