Further cleanup
parent
5e558647e7
commit
f081404ce3
|
@ -442,7 +442,7 @@ class MycroftSkill:
|
||||||
if cache_key not in self.voc_match_cache:
|
if cache_key not in self.voc_match_cache:
|
||||||
# Check for both skill resources and mycroft-core resources
|
# Check for both skill resources and mycroft-core resources
|
||||||
voc = self.find_resource(voc_filename + '.voc', 'vocab')
|
voc = self.find_resource(voc_filename + '.voc', 'vocab')
|
||||||
if not voc:
|
if not voc: # Check for vocab in mycroft core resources
|
||||||
voc = resolve_resource_file(join('text', lang,
|
voc = resolve_resource_file(join('text', lang,
|
||||||
voc_filename + '.voc'))
|
voc_filename + '.voc'))
|
||||||
|
|
||||||
|
@ -598,7 +598,7 @@ class MycroftSkill:
|
||||||
# Not found
|
# Not found
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def translate_namedvalues(self, name, delim=None):
|
def translate_namedvalues(self, name, delim=','):
|
||||||
"""Load translation dict containing names and values.
|
"""Load translation dict containing names and values.
|
||||||
|
|
||||||
This loads a simple CSV from the 'dialog' folders.
|
This loads a simple CSV from the 'dialog' folders.
|
||||||
|
@ -613,7 +613,6 @@ class MycroftSkill:
|
||||||
dict: name and value dictionary, or empty dict if load fails
|
dict: name and value dictionary, or empty dict if load fails
|
||||||
"""
|
"""
|
||||||
|
|
||||||
delim = delim or ','
|
|
||||||
if not name.endswith(".value"):
|
if not name.endswith(".value"):
|
||||||
name += ".value"
|
name += ".value"
|
||||||
|
|
||||||
|
@ -936,10 +935,9 @@ class MycroftSkill:
|
||||||
data = {'utterance': utterance,
|
data = {'utterance': utterance,
|
||||||
'expect_response': expect_response}
|
'expect_response': expect_response}
|
||||||
message = dig_for_message()
|
message = dig_for_message()
|
||||||
if message:
|
m = message.reply("speak", data) if message else Message("speak", data)
|
||||||
self.bus.emit(message.reply("speak", data))
|
self.bus.emit(m)
|
||||||
else:
|
|
||||||
self.bus.emit(Message("speak", data))
|
|
||||||
if wait:
|
if wait:
|
||||||
wait_while_speaking()
|
wait_while_speaking()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue