def process_failed(dirName, nzbName, result):
 if sickbeard.USE_FAILED_DOWNLOADS:
  processor = None
  try:
   processor = failedProcessor.FailedProcessor(dirName, nzbName)
   result.result = processor.process()
   process_fail_message = u''
  except FailedPostProcessingFailedException as e:
   result.result = False
   process_fail_message = ex(e)
  if processor:
   result.output += processor.log
  if (sickbeard.DELETE_FAILED and result.result):
   if delete_folder(dirName, check_empty=False):
    result.output += logHelper(u'Deleted folder: {0}'.format(dirName), logger.DEBUG)
  if result.result:
   result.output += logHelper(u'Failed Download Processing succeeded: ({0}, {1})'.format(nzbName, dirName))
  else:
   result.output += logHelper(u'Failed Download Processing failed: ({0}, {1}): {2}'.format(nzbName, dirName, process_fail_message), logger.WARNING)

def process_failed ( dirName , nzbName , result ) : if sickbeard . USE_FAILED_DOWNLOADS : processor = None try : processor = failedProcessor . FailedProcessor ( dirName , nzbName ) result . result = processor . process ( ) process_fail_message = u'' except FailedPostProcessingFailedException as e : result . result = False process_fail_message = ex ( e ) if processor : result . output += processor . log if ( sickbeard . DELETE_FAILED and result . result ) : if delete_folder ( dirName , check_empty = False ) : result . output += logHelper ( u'Deleted folder: {0}' . format ( dirName ) , logger . DEBUG ) if result . result : result . output += logHelper ( u'Failed Download Processing succeeded: ({0}, {1})' . format ( nzbName , dirName ) ) else : result . output += logHelper ( u'Failed Download Processing failed: ({0}, {1}): {2}' . format ( nzbName , dirName , process_fail_message ) , logger . WARNING )
process a download that did not complete correctly .