Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Commits
583c3d48
Commit
583c3d48
authored
6 years ago
by
Moul
Committed by
Mael
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[enh]
#170
: cert: confirmation chart: display validity dates:
- beginning and end of validity of current certification
parent
e7b6e26b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
silkaj/cert.py
+6
-2
6 additions, 2 deletions
silkaj/cert.py
with
6 additions
and
2 deletions
silkaj/cert.py
+
6
−
2
View file @
583c3d48
...
...
@@ -73,7 +73,7 @@ async def send_certification(id_to_certify):
message_exit
(
"
Certification is currently been processed
"
)
# Certification confirmation
certification_confirmation
(
await
certification_confirmation
(
issuer_id
,
issuer_pubkey
,
id_to_certify
,
main_id_to_certify
)
...
...
@@ -109,12 +109,16 @@ async def send_certification(id_to_certify):
await
client
.
close
()
def
certification_confirmation
(
async
def
certification_confirmation
(
issuer_id
,
issuer_pubkey
,
id_to_certify
,
main_id_to_certify
):
cert
=
list
()
cert
.
append
([
"
Cert
"
,
"
From
"
,
"
–>
"
,
"
To
"
])
cert
.
append
([
"
ID
"
,
issuer_id
,
"
–>
"
,
main_id_to_certify
[
"
uid
"
]])
cert
.
append
([
"
Pubkey
"
,
issuer_pubkey
,
"
–>
"
,
id_to_certify
[
"
pubkey
"
]])
params
=
await
BlockchainParams
().
params
cert_begins
=
convert_time
(
time
(),
"
date
"
)
cert_ends
=
convert_time
(
time
()
+
params
[
"
sigValidity
"
],
"
date
"
)
cert
.
append
([
"
Valid
"
,
cert_begins
,
"
—>
"
,
cert_ends
])
echo
(
tabulate
(
cert
,
tablefmt
=
"
fancy_grid
"
))
confirm
(
"
Do you confirm sending this certification?
"
,
abort
=
True
)
This diff is collapsed.
Click to expand it.
Moul
@moul
mentioned in issue
#187
·
5 years ago
mentioned in issue
#187
mentioned in issue #187
Toggle commit list
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