OLD | NEW |
1 #!/usr/bin/python | |
2 # | |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 3 # found in the LICENSE file. |
6 | 4 |
7 import getopt | 5 import getopt |
8 import sys | 6 import sys |
9 | 7 |
10 from idl_log import ErrOut, InfoOut, WarnOut | 8 from idl_log import ErrOut, InfoOut, WarnOut |
11 | 9 |
12 OptionMap = { } | 10 OptionMap = { } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if len(opt) == 2: opt = opt[1:] | 98 if len(opt) == 2: opt = opt[1:] |
101 if opt[0:2] == '--': opt = opt[2:] | 99 if opt[0:2] == '--': opt = opt[2:] |
102 OptionMap[opt].Set(val) | 100 OptionMap[opt].Set(val) |
103 | 101 |
104 except getopt.error, e: | 102 except getopt.error, e: |
105 ErrOut.Log('Illegal option: %s\n' % str(e)) | 103 ErrOut.Log('Illegal option: %s\n' % str(e)) |
106 DumpHelp() | 104 DumpHelp() |
107 sys.exit(-1) | 105 sys.exit(-1) |
108 | 106 |
109 return filenames | 107 return filenames |
110 | |
OLD | NEW |