~brendan-donegan/checkbox/bug1196531

« back to all changes in this revision

Viewing changes to plainbox/plainbox/impl/box.py

  • Committer: Tarmac
  • Author(s): Zygmunt Krynicki
  • Date: 2013-06-21 14:14:16 UTC
  • mfrom: (2199.1.11 launchpad/misc)
  • Revision ID: tarmac-20130621141416-hv12juje6qdwfbes
"[r=roadmr][bug=][author=zkrynicki] automatic merge by tarmac"

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        """
125
125
        Initialize with early command line arguments being already parsed
126
126
        """
127
 
        adjust_logging(level=early_ns.log_level, trace_list=early_ns.trace)
 
127
        adjust_logging(
 
128
            level=early_ns.log_level, trace_list=early_ns.trace,
 
129
            debug_console=early_ns.debug_console)
128
130
        # Load plainbox configuration
129
131
        self._config = self.get_config_cls().get()
130
132
        # Load and initialize checkbox provider
207
209
            action="store_const",
208
210
            const="DEBUG",
209
211
            help="enable DEBUG messages on the root logger")
 
212
        # Add the --debug flag
 
213
        group.add_argument(
 
214
            "-C", "--debug-console",
 
215
            action="store_true",
 
216
            help="display DEBUG messages in the console")
210
217
        # Add the --trace flag
211
218
        group.add_argument(
212
219
            "-T", "--trace",
294
301
 
295
302
 
296
303
def main(argv=None):
297
 
    raise SystemExit(PlainBox().main(argv))
 
304
    # Another try/catch block for catching KeyboardInterrupt
 
305
    # This one is really only meant for the early init abort
 
306
    # (when someone runs main but bails out before we really
 
307
    # get to the point when we do something useful and setup
 
308
    # all the exception handlers).
 
309
    try:
 
310
        raise SystemExit(PlainBox().main(argv))
 
311
    except KeyboardInterrupt:
 
312
        pass
298
313
 
299
314
 
300
315
def get_builtin_jobs():