def add_password_arg(cmd, psw, required=False):
 if (UNRAR_TOOL == ALT_TOOL):
  return
 if (psw is not None):
  cmd.append(('-p' + psw))
 else:
  cmd.append('-p-')

def add_password_arg ( cmd , psw , required = False ) : if ( UNRAR_TOOL == ALT_TOOL ) : return if ( psw is not None ) : cmd . append ( ( '-p' + psw ) ) else : cmd . append ( '-p-' )
append password switch to commandline .