Revert to getfile urls if the task is not successful (closed).

This is needed because unless the task is closed, the log files won't
be in the packages/ tree, and the email will reference 404 urls.
This commit is contained in:
Jesse Keating 2008-01-13 10:46:02 -05:00
parent c939b34ff6
commit 51e2d69f9e

View file

@ -2118,7 +2118,10 @@ Build Info: %(weburl)s/buildinfo?buildID=%(build_id)i\r
if filetype == 'rpms':
output += " %s\r\n" % '/'.join([options.pkgurl, build['name'], build['version'], build['release'], task['build_arch'], file])
elif filetype == 'logs':
output += " %s\r\n" % '/'.join([options.pkgurl, build['name'], build['version'], build['release'], 'data', 'logs', task['build_arch'], file])
if tasks[task_state] != 'closed':
output += " %s/getfile?taskID=%s&name=%s\r\n" % (weburl, task['id'], file)
else:
output += " %s\r\n" % '/'.join([options.pkgurl, build['name'], build['version'], build['release'], 'data', 'logs', task['build_arch'], file])
elif task[filetype] == 'misc':
output += " %s/getfile?taskID=%s&name=%s\r\n" % (weburl, task['id'], file)
output += "\r\n"