Skip to content

Commit fffdd82

Browse files
committed
Fediverse: Catch URLErrors raised when checking webfinger support
1 parent 689c633 commit fffdd82

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

plugins/Fediverse/plugin.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,15 @@ def _stopHttp(self):
177177

178178
def _has_webfinger_support(self, hostname):
179179
if hostname not in self._webfinger_support_cache:
180-
self._webfinger_support_cache[hostname] = ap.has_webfinger_support(
181-
hostname
182-
)
180+
try:
181+
self._webfinger_support_cache[hostname] = ap.has_webfinger_support(
182+
hostname
183+
)
184+
except Exception as e:
185+
self.log.error(
186+
"Checking Webfinger support for %s raised %s", hostname, e
187+
)
188+
return False
183189
return self._webfinger_support_cache[hostname]
184190

185191
def _get_actor(self, irc, username):

0 commit comments

Comments
 (0)