create arrays if not created in plugin

This commit is contained in:
Ryan Huber 2014-11-18 09:55:23 -08:00
parent 2027b73ba6
commit 28292b35b0

View file

@ -72,6 +72,8 @@ class Plugin(object):
for interval, function in self.module.crontable:
self.jobs.append(Job(interval, eval("self.module."+function)))
print self.module.crontable
else:
self.module.crontable = []
def do(self, function_name, data):
if function_name in dir(self.module):
try:
@ -89,6 +91,8 @@ class Plugin(object):
output.append(self.module.outputs.pop(0))
else:
break
else:
self.module.outputs = []
return output
class Job(object):