diff options
author | sr527 <sr527@cornell.edu> | 2012-06-21 10:27:52 -0400 |
---|---|---|
committer | sr527 <sr527@cornell.edu> | 2012-06-21 10:28:32 -0400 |
commit | 1842db9d10f977b6fa2115c16df0952ab08b68e3 (patch) | |
tree | 237ebc34fbcc75fcf3fd75272d42e434c8740251 /buildscripts/aggregate_tracefiles.py | |
parent | 3f33b4434a16f6f4f929def4e14d20ed6e686b73 (diff) | |
download | mongo-1842db9d10f977b6fa2115c16df0952ab08b68e3.tar.gz |
changed optionparser
Diffstat (limited to 'buildscripts/aggregate_tracefiles.py')
-rw-r--r-- | buildscripts/aggregate_tracefiles.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/buildscripts/aggregate_tracefiles.py b/buildscripts/aggregate_tracefiles.py index 11114f70ec2..e2652382601 100644 --- a/buildscripts/aggregate_tracefiles.py +++ b/buildscripts/aggregate_tracefiles.py @@ -23,16 +23,14 @@ def aggregate(inputs, output): def main (): inputs = [] - usage = "usage: %prog [options] input1.info input2.info ..." + usage = "usage: %prog input1.info input2.info ... output.info" parser = OptionParser(usage=usage) - parser.add_option('-o', '--output', dest="output", - help="tracefile to which output will be written") (options, args) = parser.parse_args() - if len(args) == 0: + if len(args) < 2: return "must supply input files" - for path in args: + for path in args[:-1]: name, ext = os.path.splitext(path) if ext == '.info': @@ -45,7 +43,7 @@ def main (): else: return "unrecognized file type" - return aggregate(inputs, options.output) + return aggregate(inputs, args[-1]) if __name__ == '__main__': sys.exit(main()) |