(hstr)
return (name, args)
Parse result of create_handler_string().
Parse result of create_handler_string().
Parse result of create_handler_string () .
def _parse_handler(hstr):
    """Parse result of create_handler_string()."""
    args = {}
    name = hstr
    pos = hstr.find('(')
    if pos > 0:
        name = hstr[ : pos]
        if hstr[-1] != ')':
            raise Exception('invalid handler format: %s' % hstr)
        astr = hstr[pos + 1 : -1]
        if astr:
            astr = astr.replace(',', '&')
            args = skytools.db_urldecode(astr)
    return (name, args)
def _parse_handler ( hstr ) : args = { } name = hstr pos = hstr . find ( '(' ) if pos > 0 : name = hstr [ : pos ] if hstr [ - 1 ] != ')' : raise Exception ( 'invalid handler format: %s' % hstr ) astr = hstr [ pos + 1 : - 1 ] if astr : astr = astr . replace ( ',' , '&' ) args = skytools . db_urldecode ( astr ) return ( name , args )