For init_argparse, only check cwd, not parents.
So you can init an etiquette inside another.
This commit is contained in:
parent
61e21fe03c
commit
21fc1c020d
1 changed files with 2 additions and 5 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue