Skip to content

Commit

Permalink
better user input handling in create_login
Browse files Browse the repository at this point in the history
  • Loading branch information
bain3 committed Sep 4, 2023
1 parent 210a57b commit 9aada51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pronotepy/create_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ def main():
qr_code = json.loads(raw_json)
pin = input("QR code PIN: ")
else:
url = input("URL of your pronote login page: ")
print()
print("Please input the full url ending with eleve/parent.html")
url = input("URL of your pronote instance: ")

ent_name = input("Your ENT (name of an ENT function, or leave empty): ")

ent = getattr(ent_module, ent_name, None)
if ent_name and not ent:
print(
f'Could not find ENT "{ent_name}". Pick one from https://pronotepy.rtfd.io/en/stable/api/ent.html'
)
return 1

username = input("Your login username: ")
password = getpass.getpass("Your login password: ")
Expand Down Expand Up @@ -49,4 +53,4 @@ def main():


if __name__ == "__main__":
main()
exit(main() or 0)

0 comments on commit 9aada51

Please sign in to comment.