From d286dca925fc0f96ba1d7fbb04961b2783283022 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Wed, 18 Oct 2023 11:47:55 -0700 Subject: [PATCH] better to log before doing a thing than after --- archivebox/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archivebox/main.py b/archivebox/main.py index b3c59633..5268691b 100755 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -425,8 +425,8 @@ def init(force: bool=False, quick: bool=False, setup: bool=False, out_dir: Path= from django.contrib.auth.models import User if (ADMIN_USERNAME and ADMIN_PASSWORD) and not User.objects.filter(username=ADMIN_USERNAME).exists(): - User.objects.create_superuser(username=ADMIN_USERNAME, password=ADMIN_PASSWORD) print('{green}[+] Found ADMIN_USERNAME and ADMIN_PASSWORD configuration options, creating new admin user.{reset}'.format(**ANSI)) + User.objects.create_superuser(username=ADMIN_USERNAME, password=ADMIN_PASSWORD) if existing_index: print('{green}[√] Done. Verified and updated the existing ArchiveBox collection.{reset}'.format(**ANSI))