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
44af6354
Commit
44af6354
authored
9 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
Fix exception not catched in network table
parent
cce41c59
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/models/network.py
+7
-4
7 additions, 4 deletions
src/cutecoin/models/network.py
with
7 additions
and
4 deletions
src/cutecoin/models/network.py
+
7
−
4
View file @
44af6354
...
...
@@ -5,8 +5,7 @@ Created on 5 févr. 2014
'''
import
logging
from
..core.person
import
Person
from
..tools.exceptions
import
PersonNotFoundError
from
..tools.exceptions
import
NoPeerAvailable
from
..core.net.node
import
Node
from
PyQt5.QtCore
import
QAbstractTableModel
,
Qt
,
QVariant
,
QSortFilterProxyModel
from
PyQt5.QtGui
import
QColor
...
...
@@ -52,7 +51,7 @@ class NetworkFilterProxyModel(QSortFilterProxyModel):
source_data
=
self
.
sourceModel
().
data
(
source_index
,
role
)
if
index
.
column
()
==
self
.
sourceModel
().
column_types
.
index
(
'
is_member
'
)
\
and
role
==
Qt
.
DisplayRole
:
value
=
{
True
:
'
yes
'
,
False
:
'
no
'
}
value
=
{
True
:
'
yes
'
,
False
:
'
no
'
,
None
:
'
offline
'
}
return
value
[
source_data
]
return
source_data
...
...
@@ -100,7 +99,11 @@ class NetworkTableModel(QAbstractTableModel):
:param ..core.net.node.Node node: Network node
:return:
"""
is_member
=
node
.
pubkey
in
self
.
community
.
members_pubkeys
()
try
:
is_member
=
node
.
pubkey
in
self
.
community
.
members_pubkeys
()
except
NoPeerAvailable
as
e
:
logging
.
error
(
e
)
is_member
=
None
address
=
""
if
node
.
endpoint
.
server
:
...
...
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