From 6a2e6aad2f9d053c0634ccffdd2967c4c4ed15e0 Mon Sep 17 00:00:00 2001 From: Cristian Date: Fri, 21 Aug 2020 07:30:11 -0500 Subject: [PATCH] fix: status command was failing on empty archives --- archivebox/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archivebox/main.py b/archivebox/main.py index e739d326..07c340ad 100644 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -460,7 +460,8 @@ def status(out_dir: str=OUTPUT_DIR) -> None: if last_login: print(f' Last UI login: {last_login.username} @ {str(last_login.last_login)[:16]}') last_updated = Snapshot.objects.order_by('updated').last() - print(f' Last changes: {str(last_updated.updated)[:16]}') + if last_updated: + print(f' Last changes: {str(last_updated.updated)[:16]}') if not users: print()