37d36
< import defines
39d37
< import traceflags
135d132
< import defines
178a176,177
> import defines
>
219a219,220
> import traceflags
>
300,309c301,302
< on_flags = []
< off_flags = []
< for flag in options.trace_flags:
< off = False
< if flag.startswith('-'):
< flag = flag[1:]
< off = True
< if flag not in traceflags.allFlags:
< print >>sys.stderr, "invalid trace flag '%s'" % flag
< sys.exit(1)
---
> if options.trace_flags:
> import traceflags
311,314c304,313
< if off:
< off_flags.append(flag)
< else:
< on_flags.append(flag)
---
> on_flags = []
> off_flags = []
> for flag in options.trace_flags:
> off = False
> if flag.startswith('-'):
> flag = flag[1:]
> off = True
> if flag not in traceflags.allFlags:
> print >>sys.stderr, "invalid trace flag '%s'" % flag
> sys.exit(1)
316,317c315,318
< for flag in on_flags:
< internal.trace.set(flag)
---
> if off:
> off_flags.append(flag)
> else:
> on_flags.append(flag)
319,320c320,321
< for flag in off_flags:
< internal.trace.clear(flag)
---
> for flag in on_flags:
> internal.trace.set(flag)
321a323,325
> for flag in off_flags:
> internal.trace.clear(flag)
>
361c365,370
< parse_args()
---
> # load the options.py config file to allow people to set their own
> # default options
> options_file = config.get('options.py')
> if options_file:
> scope = { 'options' : options }
> execfile(options_file, scope)
362a372,373
> arguments = options.parse_args()
>