Beispiel #1
0
   def excFunc(self, errMsg):
      # Use caller-set function if it exists
      if self.hasCustomFunc('excFunc'):
         self.customCallbacks['excFunc'](errMsg)
         return

      LOGEXCEPT(errMsg)
Beispiel #2
0
   def errorFunc(self, errMsg):
      # Use caller-set function if it exists
      if 'failed hash check, re-downloading it' in errMsg:
         self.nHashFailures = self.nHashFailures +1
      
      if self.hasCustomFunc('errorFunc'):
         self.customCallbacks['errorFunc'](errMsg)
         return

      LOGEXCEPT(errMsg)
Beispiel #3
0
   def failedFunc(self, msg=''):
      self.dlFailed = True
      LOGEXCEPT('Download failed! %s', msg)

      # Use caller-set function if it exists
      if self.hasCustomFunc('failedFunc'):
         self.customCallbacks['failedFunc'](msg)
         return

      if self.bt1dow:
         self.bt1dow.shutdown()