def update_moderator_ids(committer_id, moderator_usernames):
 moderator_ids = []
 for username in moderator_usernames:
  user_id = user_services.get_user_id_from_username(username)
  if (user_id is not None):
   moderator_ids.append(user_id)
  else:
   raise Exception(('Bad moderator username: %s' % username))
 Registry.get_config_property('moderator_ids').set_value(committer_id, moderator_ids)

def update_moderator_ids ( committer_id , moderator_usernames ) : moderator_ids = [ ] for username in moderator_usernames : user_id = user_services . get_user_id_from_username ( username ) if ( user_id is not None ) : moderator_ids . append ( user_id ) else : raise Exception ( ( 'Bad moderator username: %s' % username ) ) Registry . get_config_property ( 'moderator_ids' ) . set_value ( committer_id , moderator_ids )
refresh the list of moderator user_ids based on the usernames entered .