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

Commit 6a13371

Browse files
authored
Merge pull request #70 from austin-taylor/patch-1
Fix to job_output bug
2 parents 6f58b55 + 1640620 commit 6a13371

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)