Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Commit 1640620

Browse files
author
Austin Taylor
authored
Fix to job_output bug
Resolves error where rtmbot crashes due to no job_output
1 parent d346225 commit 1640620

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rtmbot/core.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ def do(self, function_name, data):
221221
)
222222

223223
def do_jobs(self):
224+
job_output = []
224225
for job in self.jobs:
225226
if job.check():
226227
# interval is up, so run the job
@@ -239,8 +240,9 @@ def do_jobs(self):
239240

240241
# job attempted execution so reset the timer and log output
241242
job.lastrun = time.time()
242-
for out in job_output:
243-
self.outputs.append(out)
243+
if job_output:
244+
for out in job_output:
245+
self.outputs.append(out)
244246

245247
def do_output(self):
246248
output = []

0 commit comments

Comments
 (0)