Edgewall Software

Changes between Initial Version and Version 1 of Ticket #12479, comment 1


Ignore:
Timestamp:
Jul 23, 2018, 12:18:54 PM (4 years ago)
Author:
Jun Omae

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12479, comment 1

    initial v1  
    1313_envs_dir = '/path/to/trac'
    1414
    15 _normalize_host_re = re.compile(r':[0-9]+\Z')
     15_host_re = re.compile(r'([A-Za-z._-]+)(?::[0-9]+)?\Z')
    1616
    1717
     
    2020    if not host:
    2121        return None
    22     host = _normalize_host_re.sub(host).rstrip('.').lower()
     22    match = _host_re.match(host)
     23    if not match:
     24        return None
     25    host = match.group(1).rstrip('.').lower()
    2326    if not host:
    2427        return None