Allows shortcuts for modules. Related to #881
This commit is contained in:
parent
4c29f8a4cd
commit
d9730033bb
1 changed files with 12 additions and 0 deletions
|
|
@ -221,6 +221,18 @@ class ConsoleApplication(BaseApplication):
|
|||
else:
|
||||
raise BackendNotGiven(_id, backends)
|
||||
if backend_name is not None and not backend_name in dict(backends):
|
||||
# Is the backend a short version of a real one?
|
||||
found = False
|
||||
for key in dict(backends):
|
||||
if backend_name in key:
|
||||
# two choices, ambiguous command
|
||||
if found:
|
||||
raise BackendNotFound(backend_name)
|
||||
else:
|
||||
found = True
|
||||
_back = key
|
||||
if found:
|
||||
return _id, _back
|
||||
raise BackendNotFound(backend_name)
|
||||
return _id, backend_name
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue