Merge remote-tracking branch 'origin/release-0.3' into develop

main
Nikita Manovich 7 years ago
commit 1b9acfb7a0

@ -402,10 +402,12 @@ def _parse_labels(labels):
raise ValueError("labels string is not corect. " +
"`{}` attribute has incorrect value.".format(attr['name']))
elif attr['type'] == 'number': # <prefix>number=name:min,max,step
if not (len(values) == 3 and values[0].isdigit() and \
values[1].isdigit() and values[2].isdigit() and \
int(values[0]) < int(values[1])):
raise ValueError("labels string is not corect. " +
try:
if len(values) != 3 or float(values[2]) <= 0 or \
float(values[0]) >= float(values[1]):
raise ValueError
except ValueError:
raise ValueError("labels string is not correct. " +
"`{}` attribute has incorrect format.".format(attr['name']))
if attr['name'] in parsed_labels[last_label]:

@ -260,6 +260,7 @@ def save_annotation_for_job(request, jid):
if 'logs' in data:
for event in json.loads(data['logs']):
clogger.job[jid].info(json.dumps(event))
slogger.job[jid].info("annotation have been saved for the {} job".format(jid))
except RequestException as e:
slogger.job[jid].error("cannot send annotation logs for job {}".format(jid), exc_info=True)
return HttpResponseBadRequest(str(e))

Loading…
Cancel
Save