import sys
from getpass import getpass

from fedora.client import AuthError
from fedora.client.fas2 import AccountSystem

username = input("Enter your username: ")
password = getpass("Enter your password: ")

try:
    FAS = AccountSystem(username=username, password=password)

    username_query = input("Enter username to query: ")

    response = FAS.person_by_username(username=username_query)

    print(f"\nEmail found: {response['email']}")

except AuthError:
    print("\nYou entered your details wrong.")
    sys.exit(1)

except KeyError:
    print("\nUsername not found. Please enter a valid username.")

9da639ce034a27ad1e078df430bafaf41b9523cd
<mask token>

<mask token>
try:
    FAS = AccountSystem(username=username, password=password)
    username_query = input('Enter username to query: ')
    response = FAS.person_by_username(username=username_query)
    print(f"\nEmail found: {response['email']}")
except AuthError:
    print('\nYou entered your details wrong.')
    sys.exit(1)
except KeyError:
    print('\nUsername not found. Please enter a valid username.')

<mask token>
username = input('Enter your username: ')
password = getpass('Enter your password: ')
try:
    FAS = AccountSystem(username=username, password=password)
    username_query = input('Enter username to query: ')
    response = FAS.person_by_username(username=username_query)
    print(f"\nEmail found: {response['email']}")
except AuthError:
    print('\nYou entered your details wrong.')
    sys.exit(1)
except KeyError:
    print('\nUsername not found. Please enter a valid username.')

import sys
from getpass import getpass
from fedora.client import AuthError
from fedora.client.fas2 import AccountSystem
username = input('Enter your username: ')
password = getpass('Enter your password: ')
try:
    FAS = AccountSystem(username=username, password=password)
    username_query = input('Enter username to query: ')
    response = FAS.person_by_username(username=username_query)
    print(f"\nEmail found: {response['email']}")
except AuthError:
    print('\nYou entered your details wrong.')
    sys.exit(1)
except KeyError:
    print('\nUsername not found. Please enter a valid username.')

import sys
from getpass import getpass

from fedora.client import AuthError
from fedora.client.fas2 import AccountSystem

username = input("Enter your username: ")
password = getpass("Enter your password: ")

try:
    FAS = AccountSystem(username=username, password=password)

    username_query = input("Enter username to query: ")

    response = FAS.person_by_username(username=username_query)

    print(f"\nEmail found: {response['email']}")

except AuthError:
    print("\nYou entered your details wrong.")
    sys.exit(1)

except KeyError:
    print("\nUsername not found. Please enter a valid username.")
