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
c0bc6b99
Commit
c0bc6b99
authored
5 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[enh] Introduce exit status constants
parent
02b41f86
No related branches found
No related tags found
3 merge requests
!146
Merge dev into master branch to complete v0.8.0 development cycle
,
!115
Close the client in case of a negative answer to the confirmation
,
!114
Close the client in case of a negative answer to the confirmation
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
silkaj/constants.py
+2
-0
2 additions, 0 deletions
silkaj/constants.py
silkaj/network_tools.py
+2
-1
2 additions, 1 deletion
silkaj/network_tools.py
silkaj/tools.py
+2
-2
2 additions, 2 deletions
silkaj/tools.py
with
6 additions
and
3 deletions
silkaj/constants.py
+
2
−
0
View file @
c0bc6b99
...
...
@@ -23,3 +23,5 @@ G1_TEST_DEFAULT_ENDPOINT = "g1-test.duniter.org", "443"
CONNECTION_TIMEOUT
=
10
ASYNC_SLEEP
=
0.1
SOURCES_PER_TX
=
40
SUCCESS_EXIT_STATUS
=
0
FAILURE_EXIT_STATUS
=
1
This diff is collapsed.
Click to expand it.
silkaj/network_tools.py
+
2
−
1
View file @
c0bc6b99
...
...
@@ -29,6 +29,7 @@ from silkaj.constants import (
G1_TEST_DEFAULT_ENDPOINT
,
CONNECTION_TIMEOUT
,
ASYNC_SLEEP
,
FAILURE_EXIT_STATUS
,
)
...
...
@@ -219,7 +220,7 @@ def best_endpoint_address(ep, main):
)
if
main
:
print
(
"
Wrong node given as argument
"
,
file
=
stderr
)
exit
(
1
)
exit
(
FAILURE_EXIT_STATUS
)
return
None
...
...
This diff is collapsed.
Click to expand it.
silkaj/tools.py
+
2
−
2
View file @
c0bc6b99
...
...
@@ -20,7 +20,7 @@ from sys import exit
from
asyncio
import
get_event_loop
from
functools
import
update_wrapper
from
silkaj.constants
import
G1_SYMBOL
,
GTEST_SYMBOL
from
silkaj.constants
import
G1_SYMBOL
,
GTEST_SYMBOL
,
FAILURE_EXIT_STATUS
from
silkaj.blockchain_tools
import
BlockchainParams
...
...
@@ -61,7 +61,7 @@ class CurrencySymbol(object):
def
message_exit
(
message
):
print
(
message
)
exit
(
1
)
exit
(
FAILURE_EXIT_STATUS
)
def
coroutine
(
f
):
...
...
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