Skip to content
Snippets Groups Projects
Commit c0bc6b99 authored by Moul's avatar Moul
Browse files

[enh] Introduce exit status constants

parent 02b41f86
No related branches found
No related tags found
3 merge requests!146Merge dev into master branch to complete v0.8.0 development cycle,!115Close the client in case of a negative answer to the confirmation,!114Close the client in case of a negative answer to the confirmation
......@@ -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
......@@ -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
......
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment