fix variable scope
This commit is contained in:
parent
b5764124ca
commit
551114e9f6
|
@ -16,8 +16,8 @@ class RunScriptSkill(MycroftSkill):
|
|||
self.read_scripts_dir()
|
||||
|
||||
def read_scripts_dir(self):
|
||||
if os.path.isdir(self.script_dir):
|
||||
self.scripts = os.listdir(script_dir)
|
||||
if self.script_dir and os.path.isdir(self.script_dir):
|
||||
self.scripts = os.listdir(self.script_dir)
|
||||
else:
|
||||
self.log.critical("The script_dir directory does not exist or can't be read")
|
||||
self.scripts = []
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"name": "script_dir",
|
||||
"type": "text",
|
||||
"label": "Directory containing scripts",
|
||||
"value": "/home/pi/scripts"
|
||||
"value": "/home/mycroft/scripts"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue