Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
matograine
silkaj
Commits
e7b6e26b
Commit
e7b6e26b
authored
Jan 30, 2019
by
Moul
Committed by
Mael
Mar 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[enh] #183: cert: use echo() and confirm() from Click
parent
374cce0a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
silkaj/cert.py
silkaj/cert.py
+5
-13
No files found.
silkaj/cert.py
View file @
e7b6e26b
...
...
@@ -15,7 +15,7 @@ You should have received a copy of the GNU Affero General Public License
along with Silkaj. If not, see <https://www.gnu.org/licenses/>.
"""
from
click
import
command
,
argument
from
click
import
command
,
argument
,
echo
,
confirm
from
time
import
time
from
tabulate
import
tabulate
from
duniterpy.api.bma
import
wot
...
...
@@ -73,11 +73,9 @@ async def send_certification(id_to_certify):
message_exit
(
"Certification is currently been processed"
)
# Certification confirmation
if
not
certification_confirmation
(
certification_confirmation
(
issuer_id
,
issuer_pubkey
,
id_to_certify
,
main_id_to_certify
):
await
client
.
close
()
return
)
identity
=
Identity
(
version
=
10
,
...
...
@@ -118,11 +116,5 @@ def certification_confirmation(
cert
.
append
([
"Cert"
,
"From"
,
"–>"
,
"To"
])
cert
.
append
([
"ID"
,
issuer_id
,
"–>"
,
main_id_to_certify
[
"uid"
]])
cert
.
append
([
"Pubkey"
,
issuer_pubkey
,
"–>"
,
id_to_certify
[
"pubkey"
]])
if
(
input
(
tabulate
(
cert
,
tablefmt
=
"fancy_grid"
)
+
"
\n
Do you confirm sending this certification? [yes/no]: "
)
==
"yes"
):
return
True
echo
(
tabulate
(
cert
,
tablefmt
=
"fancy_grid"
))
confirm
(
"Do you confirm sending this certification?"
,
abort
=
True
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment