def create_xmpp_user(password, uaserver):
  username_regex = re.compile('\A(.*)@')
  username = username_regex.match(hermes_constants.USER_EMAIL).groups()[0]
  xmpp_user = "{0}@{1}".format(username, appscale_info.get_login_ip())
  xmpp_pass = appscale_utils.encrypt_password(xmpp_user, password)
  does_user_exist = uaserver.does_user_exist(xmpp_user,
    appscale_info.get_secret())
  if does_user_exist == "true":
    logging.debug("XMPP User {0} already exists, so not creating it again.".
      format(xmpp_user))
    return True
  else:
    if uaserver.commit_new_user(xmpp_user, xmpp_pass,
        hermes_constants.ACCOUNT_TYPE, appscale_info.get_secret()) == "true":
      logging.info("XMPP username is {0}".format(xmpp_user))
      return True
    else:
      logging.error("Error while creating an XMPP user.")
      return False
Change the group of a file
dataset/ETHPy150Open AppScale/appscale/Hermes/hermes.py/create_xmpp_user--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/win_file.py/chpgrp