mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-07-22 23:00:43 -04:00
Added error handling to lxmf.delivery announce handler. Fixes #30. Hopefully.
This commit is contained in:
parent
b6e6c4bd3d
commit
3d0043499c
2 changed files with 14 additions and 9 deletions
|
@ -34,6 +34,7 @@ class Directory:
|
||||||
aspect_filter = "nomadnetwork.node"
|
aspect_filter = "nomadnetwork.node"
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def received_announce(destination_hash, announced_identity, app_data):
|
def received_announce(destination_hash, announced_identity, app_data):
|
||||||
|
try:
|
||||||
app = nomadnet.NomadNetworkApp.get_shared_instance()
|
app = nomadnet.NomadNetworkApp.get_shared_instance()
|
||||||
|
|
||||||
if not destination_hash in app.ignored_list:
|
if not destination_hash in app.ignored_list:
|
||||||
|
@ -45,6 +46,10 @@ class Directory:
|
||||||
else:
|
else:
|
||||||
RNS.log("Ignored announce from "+RNS.prettyhexrep(destination_hash), RNS.LOG_DEBUG)
|
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):
|
def __init__(self, app):
|
||||||
self.directory_entries = {}
|
self.directory_entries = {}
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -30,6 +30,6 @@ setuptools.setup(
|
||||||
entry_points= {
|
entry_points= {
|
||||||
'console_scripts': ['nomadnet=nomadnet.nomadnet:main']
|
'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",
|
python_requires=">=3.6",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue