Commit e03f802e authored by mathieui's avatar mathieui

fix: do not traceback on invalid jids in config.get_by_servname

parent e3f9af4a
Pipeline #3929 passed with stages
in 8 minutes and 12 seconds
......@@ -20,7 +20,7 @@ from pathlib import Path
from typing import Dict, List, Optional, Union, Tuple, cast, Any
from poezio import xdg
from slixmpp import JID
from slixmpp import JID, InvalidJID
log = logging.getLogger(__name__) # type: logging.Logger
......@@ -278,7 +278,10 @@ class Config:
Try to get the value of an option for a server
server = JID(jid).server
server = JID(jid).server
except InvalidJID:
server = ''
if server:
server = '@' + server
if server in self.sections() and option in self.options(server):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment