Merge pull request #1816 from MycroftAI/feature/order-translation-value
Order results from translate_namedvalues()pull/1813/head^2
commit
81f174be6f
|
@ -13,6 +13,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
import imp
|
import imp
|
||||||
|
import collections
|
||||||
import operator
|
import operator
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
@ -603,7 +604,7 @@ class MycroftSkill(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
delim = delim or ','
|
delim = delim or ','
|
||||||
result = {}
|
result = collections.OrderedDict()
|
||||||
if not name.endswith(".value"):
|
if not name.endswith(".value"):
|
||||||
name += ".value"
|
name += ".value"
|
||||||
|
|
||||||
|
@ -1049,7 +1050,7 @@ class MycroftSkill(object):
|
||||||
self.bus.emit(Message("mycroft.stop.handled",
|
self.bus.emit(Message("mycroft.stop.handled",
|
||||||
{"by": "skill:"+str(self.skill_id)}))
|
{"by": "skill:"+str(self.skill_id)}))
|
||||||
timer.cancel()
|
timer.cancel()
|
||||||
except:
|
except: # noqa
|
||||||
timer.cancel()
|
timer.cancel()
|
||||||
LOG.error("Failed to stop skill: {}".format(self.name),
|
LOG.error("Failed to stop skill: {}".format(self.name),
|
||||||
exc_info=True)
|
exc_info=True)
|
||||||
|
@ -1090,7 +1091,7 @@ class MycroftSkill(object):
|
||||||
Message("detach_skill", {"skill_id": str(self.skill_id) + ":"}))
|
Message("detach_skill", {"skill_id": str(self.skill_id) + ":"}))
|
||||||
try:
|
try:
|
||||||
self.stop()
|
self.stop()
|
||||||
except:
|
except: # noqa
|
||||||
LOG.error("Failed to stop skill: {}".format(self.name),
|
LOG.error("Failed to stop skill: {}".format(self.name),
|
||||||
exc_info=True)
|
exc_info=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue