def random_password(length=10):
  """ Generates a random password.

  Args:
    lenght: An int, the number of characters in the password.
  Returns:
    A str of random characters.
  """
  chars = string.ascii_uppercase + string.digits + string.ascii_lowercase
  password = ''
  for i in range(length):
    password += chars[len(chars) % ord(M2Crypto.m2.rand_bytes(1))]
  return password
dataset/ETHPy150Open AppScale/appscale/scripts/create_user.py/random_password/swapped operands of `%`