From 21fc1c020d7525cc8c667a55cd6f426cf14d7ea9 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 22 Nov 2025 20:30:17 -0800 Subject: [PATCH] For init_argparse, only check cwd, not parents. So you can init an etiquette inside another. --- frontends/etiquette_cli.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontends/etiquette_cli.py b/frontends/etiquette_cli.py index c4afb4f..c20186c 100644 --- a/frontends/etiquette_cli.py +++ b/frontends/etiquette_cli.py @@ -359,11 +359,8 @@ def generate_thumbnail_argparse(args): def init_argparse(args): global photodb - try: - load_photodb() - except etiquette.exceptions.NoClosestPhotoDB: - pass - else: + possible = pathclass.cwd().with_child(etiquette.constants.DEFAULT_DATADIR) + if possible.is_dir: pipeable.stderr(f'PhotoDB {photodb} already exists.') return 0 photodb = etiquette.photodb.PhotoDB(create=True)