|
@@ -48,12 +48,12 @@ def launch_services(cclient, interrupted, trigger_interrupted):
|
|
|
t = threading.Thread(target=s.init)
|
|
t = threading.Thread(target=s.init)
|
|
|
t.start()
|
|
t.start()
|
|
|
|
|
|
|
|
|
|
+ preferred_phrases = _services.keys() + ['quit', 'cancel']
|
|
|
|
|
+
|
|
|
output.text('Ready. Available services: %s.' % ', '.join(sorted(_services.keys())))
|
|
output.text('Ready. Available services: %s.' % ', '.join(sorted(_services.keys())))
|
|
|
|
|
|
|
|
while not interrupted():
|
|
while not interrupted():
|
|
|
- input_sources.PREFERRED_PHRASES = _services.keys() + ['quit', 'cancel']
|
|
|
|
|
-
|
|
|
|
|
- t = input_sources.get_token(1)
|
|
|
|
|
|
|
+ t = input_sources.get_token(1, preferred_phrases=preferred_phrases)
|
|
|
if t is not None and t in _services and _services[t].initialized:
|
|
if t is not None and t in _services and _services[t].initialized:
|
|
|
try:
|
|
try:
|
|
|
_services[t].call()
|
|
_services[t].call()
|