Skip to content

Commit

Permalink
feat!: simplify admin password prompt for new site (#25937)
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Apr 13, 2024
1 parent e7cb2c0 commit 37cef2e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions frappe/utils/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,7 @@ def install_basic_docs():


def get_admin_password():
def ask_admin_password():
admin_password = getpass.getpass("Set Administrator password: ")
admin_password2 = getpass.getpass("Re-enter Administrator password: ")
if admin_password != admin_password2:
print("\nPasswords do not match")
return ask_admin_password()
return admin_password

admin_password = frappe.conf.get("admin_password")
if not admin_password:
return ask_admin_password()
return admin_password
return frappe.conf.get("admin_password") or getpass.getpass("Set Administrator password: ")


def before_tests():
Expand Down

0 comments on commit 37cef2e

Please sign in to comment.