Added error handling to lxmf.delivery announce handler. Fixes #30. Hopefully.

This commit is contained in:
Mark Qvist 2023-08-13 20:37:44 +02:00
parent b6e6c4bd3d
commit 3d0043499c
2 changed files with 14 additions and 9 deletions

View file

@ -34,6 +34,7 @@ class Directory:
aspect_filter = "nomadnetwork.node"
@staticmethod
def received_announce(destination_hash, announced_identity, app_data):
try:
app = nomadnet.NomadNetworkApp.get_shared_instance()
if not destination_hash in app.ignored_list:
@ -45,6 +46,10 @@ class Directory:
else:
RNS.log("Ignored announce from "+RNS.prettyhexrep(destination_hash), RNS.LOG_DEBUG)
except Exception as e:
RNS.log("Error while evaluating LXMF destination announce, ignoring announce.", RNS.LOG_DEBUG)
RNS.log("The contained exception was: "+str(e), RNS.LOG_DEBUG)
def __init__(self, app):
self.directory_entries = {}

View file

@ -30,6 +30,6 @@ setuptools.setup(
entry_points= {
'console_scripts': ['nomadnet=nomadnet.nomadnet:main']
},
install_requires=["rns>=0.5.5", "lxmf>=0.3.2", "urwid>=2.1.2", "qrcode"],
install_requires=["rns>=0.5.7", "lxmf>=0.3.2", "urwid>=2.1.2", "qrcode"],
python_requires=">=3.6",
)