mirror of https://gitlab.com/bashrc2/epicyon
18 lines
454 B
Python
18 lines
454 B
Python
|
__filename__ = "domainhandler.py"
|
||
|
__author__ = "Bob Mottram"
|
||
|
__license__ = "AGPL3+"
|
||
|
__version__ = "1.2.0"
|
||
|
__maintainer__ = "Bob Mottram"
|
||
|
__email__ = "bob@freedombone.net"
|
||
|
__status__ = "Production"
|
||
|
__module_group__ = "Core"
|
||
|
|
||
|
|
||
|
def removeDomainPort(domain: str) -> str:
|
||
|
"""If the domain has a port appended then remove it
|
||
|
eg. mydomain.com:80 becomes mydomain.com
|
||
|
"""
|
||
|
if ':' in domain:
|
||
|
domain = domain.split(':')[0]
|
||
|
return domain
|