| 281 | self.args = parser.parse_args(argv) |
| 282 | |
| 283 | def DumpInputFiles(self): |
| 284 | |
| 285 | def DumpContentsOfFilePassedTo(arg_name, path): |
| 286 | if path and self.Exists(path): |
| 287 | self.Print("\n# To recreate the file passed to %s:" % arg_name) |
| 288 | self.Print("%% cat > %s <<EOF" % path) |
| 289 | contents = self.ReadFile(path) |
| 290 | self.Print(contents) |
| 291 | self.Print("EOF\n%\n") |
| 292 | |
| 293 | if getattr(self.args, 'input_path', None): |
| 294 | DumpContentsOfFilePassedTo( |
| 295 | 'argv[0] (input_path)', self.args.input_path[0]) |
| 296 | if getattr(self.args, 'swarming_targets_file', None): |
| 297 | DumpContentsOfFilePassedTo( |
| 298 | '--swarming-targets-file', self.args.swarming_targets_file) |
| 299 | |
| 300 | def CmdAnalyze(self): |
| 301 | vals = self.Lookup() |