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):
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue