For init_argparse, only check cwd, not parents.

So you can init an etiquette inside another.
This commit is contained in:
voussoir 2025-11-22 20:30:17 -08:00
parent 61e21fe03c
commit 21fc1c020d

View file

@ -359,11 +359,8 @@ def generate_thumbnail_argparse(args):
def init_argparse(args): def init_argparse(args):
global photodb global photodb
try: possible = pathclass.cwd().with_child(etiquette.constants.DEFAULT_DATADIR)
load_photodb() if possible.is_dir:
except etiquette.exceptions.NoClosestPhotoDB:
pass
else:
pipeable.stderr(f'PhotoDB {photodb} already exists.') pipeable.stderr(f'PhotoDB {photodb} already exists.')
return 0 return 0
photodb = etiquette.photodb.PhotoDB(create=True) photodb = etiquette.photodb.PhotoDB(create=True)