The example code in the task writing docs currently contains:
from libtaskotron import check
def run_mytask(rpmfiles, bodhi_id): """run through all passed in rpmfiles and emit TAP13 saying they all passed"""
print "Running mytask on %s" % (str(bodhi_id)) details = [] result = 'PASSED' summary = 'mycheck %s for %s' % (result, str(bodhi_id)) detail = check.CheckDetail(rpmfile, check.ReportType.BODHI_UPDATE, result, summary) for rpmfile in rpmfiles: detail.store(rpmfile, False) return check.export_TAP(detail)
The detail = line isn't right since rpmfile hasn't yet been assigned. It should be str(bodhi_id)
detail =
rpmfile
str(bodhi_id)
Simple documentation fix.
This ticket had assigned some Differential requests: D105
Resolved in D105, closing.
Metadata Update from @tflink: - Issue tagged with: easyfix