Commit e0b1d6ab authored by Chris McDonough's avatar Chris McDonough

Modified getopt stuff so that files can be given before -- args

or vice versa.
parent 7a8cf472
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
""" Request log profiler script """ """ Request log profiler script """
__version__='$Revision: 1.11 $'[11:-2] __version__='$Revision: 1.12 $'[11:-2]
import string, sys, time, getopt, tempfile import string, sys, time, getopt, tempfile
...@@ -596,10 +596,12 @@ if __name__ == '__main__': ...@@ -596,10 +596,12 @@ if __name__ == '__main__':
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
if arg[:2] != '--': if arg[:2] != '--':
files.append(open(arg)) files.append(open(arg))
sys.argv.remove(arg)
i = i + 1 i = i + 1
try: try:
opts, extra = getopt.getopt( opts, extra = getopt.getopt(
sys.argv[i:], '', ['sort=', 'top=', 'help', 'verbose', 'today', sys.argv[1:], '', ['sort=', 'top=', 'help', 'verbose', 'today',
'cumulative', 'detailed', 'timed','start=', 'cumulative', 'detailed', 'timed','start=',
'end=','resolution='] 'end=','resolution=']
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment