diff --git a/__init__.py b/__init__.py index c5228bb..ca9c897 100644 --- a/__init__.py +++ b/__init__.py @@ -1,5 +1,5 @@ import os -import thread +from threading import Thread from mycroft import MycroftSkill, intent_handler class RunScriptSkill(MycroftSkill): @@ -31,7 +31,8 @@ class RunScriptSkill(MycroftSkill): script_path = os.path.join(self.script_dir, script) if script in self.scripts and os.path.isfile(script_path): self.speak_dialog('Running', {'script': script}) - thread.start_new_thread(os.system, (script_path)) + thread = Thread(target = os.system, args = (script_path, )) + thread.start() else: self.speak_dialog('NotFound', {'script': script})