Changes between Initial Version and Version 1 of Ticket #12479, comment 1
- Timestamp:
- Jul 23, 2018, 12:18:54 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12479, comment 1
initial v1 13 13 _envs_dir = '/path/to/trac' 14 14 15 _ normalize_host_re = re.compile(r':[0-9]+\Z')15 _host_re = re.compile(r'([A-Za-z._-]+)(?::[0-9]+)?\Z') 16 16 17 17 … … 20 20 if not host: 21 21 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() 23 26 if not host: 24 27 return None