Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _build(self, mo, element_store, environ):
try:
abbr, title = mo.group(1).split(":", 1)
except ValueError:
abbr = mo.group(1)
title = None
return creoleparser.core.bldr.tag.__getattr__('abbr')(
creoleparser.core.fragmentize(abbr,
self.child_elements,
element_store, environ), title=title)
attrs = {}
if isinstance(act, Activity):
due = act.due_date
if due:
iso8601 = local_tz.localize(due).isoformat()
text = act.due_date.strftime(dateformat)
attrs['title'] = iso8601
else:
text = u'["%s" has no due date specified]' % (act.name)
attrs['class'] = 'empty'
else:
# error
text = act
attrs['class'] = 'empty'
return creoleparser.core.bldr.tag.__getattr__('span')(text, **attrs)