Skip to content
Snippets Groups Projects
Commit b2aa58b0 authored by inso's avatar inso
Browse files

Handle NoPeerAvailable in certifiers&certified list

parent 66c632d2
No related branches found
No related tags found
No related merge requests found
...@@ -301,9 +301,13 @@ class Identity(QObject): ...@@ -301,9 +301,13 @@ class Identity(QObject):
# add certifiers of uid # add certifiers of uid
for certifier in tuple(certifier_list): for certifier in tuple(certifier_list):
# add only valid certification... # add only valid certification...
try:
cert_expired = yield from community.certification_expired(certifier['cert_time']) cert_expired = yield from community.certification_expired(certifier['cert_time'])
if cert_expired: if cert_expired:
continue continue
except NoPeerAvailable:
logging.debug("No peer available")
continue
# keep only the latest certification # keep only the latest certification
already_found = [c['identity'].pubkey for c in unique_valid] already_found = [c['identity'].pubkey for c in unique_valid]
...@@ -373,9 +377,13 @@ class Identity(QObject): ...@@ -373,9 +377,13 @@ class Identity(QObject):
# add certifiers of uid # add certifiers of uid
for certified in tuple(certified_list): for certified in tuple(certified_list):
# add only valid certification... # add only valid certification...
try:
cert_expired = yield from community.certification_expired(certified['cert_time']) cert_expired = yield from community.certification_expired(certified['cert_time'])
if cert_expired: if cert_expired:
continue continue
except NoPeerAvailable:
logging.debug("No peer available")
continue
# keep only the latest certification # keep only the latest certification
already_found = [c['identity'].pubkey for c in unique_valid] already_found = [c['identity'].pubkey for c in unique_valid]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment