Avoid duplicate prefixes

main
Bob Mottram 2020-06-11 13:46:44 +01:00
parent 6e769484aa
commit d523a6354d
1 changed files with 1 additions and 2 deletions

View File

@ -242,8 +242,7 @@ def getDomainFromActor(actor: str) -> (str, int):
"""Returns the domain name from an actor url """Returns the domain name from an actor url
""" """
port = None port = None
prefixes = ('https://', 'http://', 'dat://', 'i2p://', 'gnunet://', prefixes = getProtocolPrefixes()
'hyper://', 'gemini://', 'gopher://')
if '/profile/' in actor: if '/profile/' in actor:
domain = actor.split('/profile/')[0] domain = actor.split('/profile/')[0]
for prefix in prefixes: for prefix in prefixes: