fix invoke.py crash if no models.yaml file present

- Script will now offer the user the ability to create a
  minimal models.yaml and then gracefully exit.
- Closes #1420
This commit is contained in:
Lincoln Stein
2022-11-10 21:27:25 +00:00
parent b4b6eabaac
commit 116415b3fc
2 changed files with 39 additions and 1 deletions

View File

@ -284,6 +284,7 @@ class Completer(object):
switch,partial_path = match.groups()
partial_path = partial_path.lstrip()
matches = list()
path = os.path.expanduser(partial_path)
@ -321,6 +322,7 @@ class Completer(object):
matches.append(
switch+os.path.join(os.path.dirname(full_path), node)
)
return matches
class DummyCompleter(Completer):