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
368d8eb4
Commit
368d8eb4
authored
6 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[mod]
#148
: consistency: rename f(), usage and print.
parent
1534b994
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
silkaj/cli_tools.py
+4
-4
4 additions, 4 deletions
silkaj/cli_tools.py
silkaj/commands.py
+2
-2
2 additions, 2 deletions
silkaj/commands.py
with
6 additions
and
6 deletions
silkaj/cli_tools.py
+
4
−
4
View file @
368d8eb4
...
@@ -11,7 +11,7 @@ from silkaj.commands import (
...
@@ -11,7 +11,7 @@ from silkaj.commands import (
set_network_sort_keys
,
set_network_sort_keys
,
network_info
,
network_info
,
argos_info
,
argos_info
,
list_
issuer
s
,
list_
block
s
,
)
)
from
silkaj.tools
import
message_exit
from
silkaj.tools
import
message_exit
from
silkaj.network_tools
import
get_request
from
silkaj.network_tools
import
get_request
...
@@ -76,8 +76,8 @@ def usage():
...
@@ -76,8 +76,8 @@ def usage():
\n
\
\n
\
\n
- diffi: list proof-of-work difficulty to generate next block
\
\n
- diffi: list proof-of-work difficulty to generate next block
\
\n
\
\n
\
\n
- blocks n: display last n
issuer
s (`0` for current window size)
\
\n
- blocks n: display last n
block
s (`0` for current window size)
\
\n
last
issuer
s are displayed under n <= 30.
\
\n
last
block
s are displayed under n <= 30.
\
\n
To force display last ones, use `--last` option
\
\n
To force display last ones, use `--last` option
\
\n
\
\n
\
\n
- argos: display currency information formated for Argos or BitBar
\
\n
- argos: display currency information formated for Argos or BitBar
\
...
@@ -152,7 +152,7 @@ def manage_cmd():
...
@@ -152,7 +152,7 @@ def manage_cmd():
and
cli_args
.
subsubcmd
and
cli_args
.
subsubcmd
and
int
(
cli_args
.
subsubcmd
)
>=
0
and
int
(
cli_args
.
subsubcmd
)
>=
0
):
):
list_
issuer
s
(
int
(
cli_args
.
subsubcmd
),
cli_args
.
contains_switches
(
"
last
"
))
list_
block
s
(
int
(
cli_args
.
subsubcmd
),
cli_args
.
contains_switches
(
"
last
"
))
elif
cli_args
.
subcmd
==
"
argos
"
:
elif
cli_args
.
subcmd
==
"
argos
"
:
argos_info
()
argos_info
()
...
...
This diff is collapsed.
Click to expand it.
silkaj/commands.py
+
2
−
2
View file @
368d8eb4
...
@@ -222,7 +222,7 @@ def network_info(discover):
...
@@ -222,7 +222,7 @@ def network_info(discover):
print
(
tabulate
(
endpoints
,
headers
=
"
keys
"
,
tablefmt
=
"
orgtbl
"
,
stralign
=
"
center
"
))
print
(
tabulate
(
endpoints
,
headers
=
"
keys
"
,
tablefmt
=
"
orgtbl
"
,
stralign
=
"
center
"
))
def
list_
issuer
s
(
nbr
,
last
):
def
list_
block
s
(
nbr
,
last
):
head_block
=
HeadBlock
().
head_block
head_block
=
HeadBlock
().
head_block
current_nbr
=
head_block
[
"
number
"
]
current_nbr
=
head_block
[
"
number
"
]
if
nbr
==
0
:
if
nbr
==
0
:
...
@@ -253,7 +253,7 @@ def list_issuers(nbr, last):
...
@@ -253,7 +253,7 @@ def list_issuers(nbr, last):
issuer2
[
"
uid
"
]
=
uid
issuer2
[
"
uid
"
]
=
uid
issuer2
.
pop
(
"
pubkey
"
)
issuer2
.
pop
(
"
pubkey
"
)
print
(
print
(
"
Issuers for l
ast {0} blocks from
block
n°{1} to
block
n°{2}
"
.
format
(
"
L
ast {0} blocks from n°{1} to n°{2}
"
.
format
(
nbr
,
current_nbr
-
nbr
+
1
,
current_nbr
nbr
,
current_nbr
-
nbr
+
1
,
current_nbr
),
),
end
=
"
"
,
end
=
"
"
,
...
...
This diff is collapsed.
Click to expand it.
Moul
@moul
mentioned in merge request
!95 (closed)
·
6 years ago
mentioned in merge request
!95 (closed)
mentioned in merge request !95
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