def rarfile_set_tool_path(config):
 unrar_tool = config[u'unrar_tool']
 if unrar_tool:
  if (not rarfile):
   log.error(u'rar_tool specified with no rarfile module installed.')
  else:
   rarfile.UNRAR_TOOL = unrar_tool
   log.debug(u'Set RarFile.unrar_tool to: %s', unrar_tool)

def rarfile_set_tool_path ( config ) : unrar_tool = config [ u'unrar_tool' ] if unrar_tool : if ( not rarfile ) : log . error ( u'rar_tool specified with no rarfile module installed.' ) else : rarfile . UNRAR_TOOL = unrar_tool log . debug ( u'Set RarFile.unrar_tool to: %s' , unrar_tool )
manually set the path of unrar executable if it cant be resolved from the path environment variable .