Message354275
Yes, that does work:
>>> urllib.parse.urlunparse(("http", f"{host}:{port}", "/", "", "", ""))
'http://hostname:1234/'
The only problem is that your code now needs to look like
>>> port=None
>>> urllib.parse.urlunparse(("http", f"{host}{(':' + str(port)) if port else ''}", "/", "", "", ""))
'http://hostname/' |
|
Date |
User |
Action |
Args |
2019-10-09 14:44:33 | eric.smith | set | recipients:
+ eric.smith, gvanrossum, Amir, James Allsopp |
2019-10-09 14:44:33 | eric.smith | set | messageid: <1570632273.14.0.431057112609.issue38408@roundup.psfhosted.org> |
2019-10-09 14:44:33 | eric.smith | link | issue38408 messages |
2019-10-09 14:44:33 | eric.smith | create | |
|