def add_or_update(priority, name, code=None):
 (load_order, existing_code) = _existing_info(name, True)
 if (load_order is not None):
  if (not code):
   code = _default_loader(name)
  if ((load_order == priority) and (code.strip() == existing_code.strip())):
   return
  remove(name)
  swap_event.wait()
 add(priority, name, code)

def add_or_update ( priority , name , code = None ) : ( load_order , existing_code ) = _existing_info ( name , True ) if ( load_order is not None ) : if ( not code ) : code = _default_loader ( name ) if ( ( load_order == priority ) and ( code . strip ( ) == existing_code . strip ( ) ) ) : return remove ( name ) swap_event . wait ( ) add ( priority , name , code )
adds a loader if none exists for a package .