person=person, subject=subject,
max_late=max_late, dry_run=dry_run)
except _InvalidMessage as error:
+ error.course = course
+ error.message = original
+ if person is not None and not hasattr(error, 'person'):
+ error.person = person
+ if subject is not None and not hasattr(error, 'subject'):
+ error.subject = subject
+ if target is not None and not hasattr(error, 'target'):
+ error.target = target
+ _LOG.warn('invalid message {}'.format(error.message_id()))
if not continue_after_invalid_message:
raise
if respond:
- error.course = course
- error.message = original
- if person is not None and not hasattr(error, 'person'):
- error.person = person
- if subject is not None and not hasattr(error, 'subject'):
- error.subject = subject
- if target is not None and not hasattr(error, 'target'):
- error.target = target
response = _get_error_response(error)
respond(response)
except _Response as response:
try:
ret = _parse_message(course=course, message=msg)
except _InvalidMessage as error:
+ error.message = msg
+ _LOG.warn('invalid message {}'.format(error.message_id()))
if not continue_after_invalid_message:
raise
if respond: