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
a71fd3e0
Commit
a71fd3e0
authored
10 years ago
by
inso
Browse files
Options
Downloads
Patches
Plain Diff
Fix error when sending membership
parent
ea997595
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/ucoinpy/documents/block.py
+3
-2
3 additions, 2 deletions
lib/ucoinpy/documents/block.py
src/cutecoin/core/person.py
+1
-0
1 addition, 0 deletions
src/cutecoin/core/person.py
src/cutecoin/gui/community_tab.py
+6
-0
6 additions, 0 deletions
src/cutecoin/gui/community_tab.py
with
10 additions
and
2 deletions
lib/ucoinpy/documents/block.py
+
3
−
2
View file @
a71fd3e0
...
...
@@ -73,6 +73,7 @@ BOTTOM_SIGNATURE
re_actives
=
re
.
compile
(
"
Actives:
\n
"
)
re_leavers
=
re
.
compile
(
"
Leavers:
\n
"
)
re_excluded
=
re
.
compile
(
"
Excluded:
\n
"
)
re_exclusion
=
re
.
compile
(
"
([1-9A-Za-z][^OIl]{42,45})
\n
"
)
re_certifications
=
re
.
compile
(
"
Certifications:
\n
"
)
re_transactions
=
re
.
compile
(
"
Transactions:
\n
"
)
...
...
@@ -197,7 +198,7 @@ BOTTOM_SIGNATURE
if
Block
.
re_excluded
.
match
(
lines
[
n
]):
n
=
n
+
1
while
Block
.
re_certifications
.
match
(
lines
[
n
])
is
None
:
membership
=
Membership
.
from_inline
(
version
,
currency
,
"
OUT
"
,
lines
[
n
]
)
membership
=
Block
.
re_exclusion
.
match
(
lines
[
n
]).
group
(
1
)
excluded
.
append
(
membership
)
n
=
n
+
1
...
...
@@ -282,7 +283,7 @@ PreviousIssuer: {1}\n".format(self.prev_hash, self.prev_issuer)
doc
+=
"
Excluded:
\n
"
for
exclude
in
self
.
excluded
:
doc
+=
"
{0}
\n
"
.
format
(
exclude
.
inline
()
)
doc
+=
"
{0}
\n
"
.
format
(
exclude
)
doc
+=
"
Certifications:
\n
"
for
cert
in
self
.
certifications
:
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/core/person.py
+
1
−
0
View file @
a71fd3e0
...
...
@@ -32,6 +32,7 @@ class Person(object):
'''
data
=
community
.
request
(
bma
.
wot
.
Lookup
,
req_args
=
{
'
search
'
:
pubkey
})
results
=
data
[
'
results
'
]
logging
.
debug
(
results
)
timestamp
=
0
for
result
in
data
[
'
results
'
]:
...
...
This diff is collapsed.
Click to expand it.
src/cutecoin/gui/community_tab.py
+
6
−
0
View file @
a71fd3e0
...
...
@@ -14,6 +14,7 @@ from .add_contact import AddContactDialog
from
.wot_tab
import
WotTabWidget
from
.transfer
import
TransferMoneyDialog
from
.certification
import
CertificationDialog
from
..tools.exceptions
import
PersonNotFoundError
class
CommunityTabWidget
(
QWidget
,
Ui_CommunityTabWidget
):
...
...
@@ -32,6 +33,7 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
self
.
account
=
account
self
.
password_asker
=
password_asker
self
.
list_community_members
.
setModel
(
MembersListModel
(
community
))
self
.
button_membership
.
disconnect
()
if
self
.
account
.
member_of
(
self
.
community
):
self
.
button_membership
.
setText
(
"
Send leaving demand
"
)
...
...
@@ -111,6 +113,10 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
except
ValueError
as
e
:
QMessageBox
.
critical
(
self
,
"
Join demand error
"
,
e
.
message
)
except
PersonNotFoundError
as
e
:
QMessageBox
.
critical
(
self
,
"
Key not sent to community
"
,
"
Your key wasn
'
t sent in the community.
\
You can
'
t request a membership.
"
)
def
send_membership_leaving
(
self
):
password
=
""
...
...
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