Compatibility with python 3.7.6
The urlparse function has changed.
Old versions:
```python
>>> urlparse('localhost:8500')
ParseResult(scheme='', netloc='', path='localhost:8500', params='', query='', fragment='')
```
3.7.6:
```python
>>> urlparse('localhost:8500')
ParseResult(scheme='localhost', netloc='', path='8500', params='', query='', fragment='')
```
@@ -49,11 +49,11 @@ class PatroniCtlException(ClickException):
def parse_dcs(dcs):
if dcs is None:
return None
+ elif '//' not in dcs:
+ dcs = '//' + dcs
parsed = urlparse(dcs)
scheme = parsed.scheme
- if scheme == '' and parsed.netloc == '':
- parsed = urlparse('//' + dcs)
port = int(parsed.port) if parsed.port else None
if scheme == '':
