Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
sakia
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
clients
python
sakia
Commits
16f439fa
Commit
16f439fa
authored
9 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug endless loading of wot if path can not be determine between two identities
parent
b2078f01
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cutecoin/core/graph.py
+17
-2
17 additions, 2 deletions
src/cutecoin/core/graph.py
with
17 additions
and
2 deletions
src/cutecoin/core/graph.py
+
17
−
2
View file @
16f439fa
...
@@ -56,13 +56,28 @@ class Graph(object):
...
@@ -56,13 +56,28 @@ class Graph(object):
"""
"""
path
=
list
()
path
=
list
()
# if from_identity has no certifications, we can not make a path
certifier_list
=
yield
from
from_identity
.
unique_valid_certifiers_of
(
self
.
app
.
identities_registry
,
self
.
community
)
certified_list
=
yield
from
from_identity
.
unique_valid_certified_by
(
self
.
app
.
identities_registry
,
self
.
community
)
print
(
certifier_list
,
certified_list
)
if
not
certifier_list
and
not
certified_list
:
logging
.
debug
(
'
from_identity has no certifications : can not calculate wot path
'
)
return
path
# if to_identity has no certifications, we can not make a path
certifier_list
=
yield
from
to_identity
.
unique_valid_certifiers_of
(
self
.
app
.
identities_registry
,
self
.
community
)
certified_list
=
yield
from
to_identity
.
unique_valid_certified_by
(
self
.
app
.
identities_registry
,
self
.
community
)
if
not
certifier_list
and
not
certified_list
:
logging
.
debug
(
'
to_identity has no certifications : can not calculate wot path
'
)
return
path
logging
.
debug
(
"
path between %s to %s...
"
%
(
from_identity
.
uid
,
to_identity
.
uid
))
logging
.
debug
(
"
path between %s to %s...
"
%
(
from_identity
.
uid
,
to_identity
.
uid
))
if
from_identity
.
pubkey
not
in
self
.
_graph
.
keys
():
if
from_identity
.
pubkey
not
in
self
.
_graph
.
keys
():
self
.
add_identity
(
from_identity
)
self
.
add_identity
(
from_identity
)
certifier_list
=
yield
from
from_identity
.
certifiers_of
(
self
.
app
.
identities_registry
,
certifier_list
=
yield
from
from_identity
.
unique_valid_
certifiers_of
(
self
.
app
.
identities_registry
,
self
.
community
)
self
.
community
)
yield
from
self
.
add_certifier_list
(
certifier_list
,
from_identity
,
to_identity
)
yield
from
self
.
add_certifier_list
(
certifier_list
,
from_identity
,
to_identity
)
certified_list
=
yield
from
from_identity
.
certified_by
(
self
.
app
.
identities_registry
,
certified_list
=
yield
from
from_identity
.
unique_valid_
certified_by
(
self
.
app
.
identities_registry
,
self
.
community
)
self
.
community
)
yield
from
self
.
add_certified_list
(
certified_list
,
from_identity
,
to_identity
)
yield
from
self
.
add_certified_list
(
certified_list
,
from_identity
,
to_identity
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment