Esempio n. 1
0
 def doAction(self):
     if not self._isSupportedTarget():
         log.warning('Action %s not supported for target OS %s'
             % self.__class__.__name__, self._getTarget())
         return
     if self.debug:
         debugger.set_trace()
     self.do()
Esempio n. 2
0
 def doAction(self):
     if not self._isSupportedTarget():
         log.warning(
             'Action %s not supported for target OS %s' %
             self.__class__.__name__, self._getTarget())
         return
     if self.debug:
         debugger.set_trace()
     self.do()
Esempio n. 3
0
        for (arg, name) in cfgMap.items():
            if argSet.has_key(arg):
                cfg.configLine("%s %s" % (name, argSet[arg]))
                del argSet[arg]

    if addVerboseOptions:
        if 'verbose' in argSet:
            if argSet['verbose'] is True:
                log.setVerbosity(log.INFO)
            del argSet['verbose']

    if addDebugOptions:
        if argSet.has_key('debugger'):
            del argSet['debugger']
            from conary.lib import debugger
            debugger.set_trace()
            sys.excepthook = util.genExcepthook(debug=cfg.debugExceptions,
                                                debugCtrlC=True)

        if 'debug' in argSet:
            if argSet['debug'] is True:
                log.setVerbosity(log.DEBUG)
            else:
                log.setVerbosity(log.LOWLEVEL)
            del argSet['debug']
        else:
            if log.getVerbosity() > log.WARNING:
                log.setVerbosity(log.WARNING)

    return argSet, otherArgs, parser, options
Esempio n. 4
0
        for (arg, name) in cfgMap.items():
            if argSet.has_key(arg):
                cfg.configLine("%s %s" % (name, argSet[arg]))
                del argSet[arg]

    if addVerboseOptions:
        if 'verbose' in argSet:
            if argSet['verbose'] is True:
                log.setVerbosity(log.INFO)
            del argSet['verbose']

    if addDebugOptions:
        if argSet.has_key('debugger'):
            del argSet['debugger']
            from conary.lib import debugger
            debugger.set_trace()
            sys.excepthook = util.genExcepthook(debug=cfg.debugExceptions,
                                                debugCtrlC=True)

        if 'debug' in argSet:
            if argSet['debug'] is True:
                log.setVerbosity(log.DEBUG)
            else:
                log.setVerbosity(log.LOWLEVEL)
            del argSet['debug']
        else:
            if log.getVerbosity() > log.WARNING:
                log.setVerbosity(log.WARNING)


    return argSet, otherArgs, parser, options