示例#1
0
    def __init__(self, signal):
        # Call the base class constructor with the parameters it needs
        message = Constants.get_description(signal)
        super(SignalReceivedException,
              self).__init__('{} ({})'.format(message, signal))

        # Now for your custom code...
        self.signal = signal
示例#2
0
文件: lowlevel.py 项目: wp140x/bareos
 def __set_status(self, status):
     self.status = status
     status_text = Constants.get_description(status)
     self.logger.debug(str(status_text) + " (" + str(status) + ")")
示例#3
0
文件: lowlevel.py 项目: bareos/bareos
 def __set_status(self, status):
     self.status = status
     status_text = Constants.get_description(status)
     self.logger.debug(str(status_text) + " (" + str(status) + ")")