def parse_isotime(timestr):
 try:
  return iso8601.parse_date(timestr)
 except iso8601.ParseError as e:
  raise ValueError(encodeutils.exception_to_unicode(e))
 except TypeError as e:
  raise ValueError(encodeutils.exception_to_unicode(e))

def parse_isotime ( timestr ) : try : return iso8601 . parse_date ( timestr ) except iso8601 . ParseError as e : raise ValueError ( encodeutils . exception_to_unicode ( e ) ) except TypeError as e : raise ValueError ( encodeutils . exception_to_unicode ( e ) )
this duplicates oslo timeutils parse_isotime but with a @register .