From c6a45ba8192dbcf97213452c08adc600de056a1a Mon Sep 17 00:00:00 2001 From: Lionel Dricot Date: Fri, 14 Jan 2022 14:54:27 +0100 Subject: [PATCH] cosmetic changes --- offpunk.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/offpunk.py b/offpunk.py index 9a9540f..f367752 100755 --- a/offpunk.py +++ b/offpunk.py @@ -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