cosmetic changes

This commit is contained in:
Lionel Dricot 2022-01-14 14:54:27 +01:00
parent 2158b78e77
commit c6a45ba819
1 changed files with 2 additions and 4 deletions

View File

@ -213,7 +213,6 @@ class GeminiItem():
self.title = self.name
else:
self.title = self.path
else:
self.title = self.host
if "user" in self.path:
@ -406,8 +405,6 @@ CRLF = '\r\n'
def looks_like_url(word):
try:
url = fix_ipv6_url(word).strip()
#print("looks_like_url before %s"%word)
#print("looks_like_url after %s"%url)
parsed = urllib.parse.urlparse(url)
#sometimes, urllib crashed only when requesting the port
port = parsed.port
@ -415,7 +412,8 @@ def looks_like_url(word):
or word.startswith("https://")
if not start:
return looks_like_url("gemini://"+word)
return "." in word and start
else:
return "." in word
except ValueError:
return False