* phrase security.md better
* display correct number of peers in stats * hopefully fix sigpipe issue
This commit is contained in:
parent
901b275d40
commit
8a9a5abe2e
4 changed files with 10 additions and 5 deletions
|
@ -132,7 +132,10 @@ def raw(data, fd = sys.stdout, sensitive = False):
|
|||
'''
|
||||
|
||||
if get_settings() & OUTPUT_TO_CONSOLE:
|
||||
ts = fd.write('%s\n' % data)
|
||||
try:
|
||||
ts = fd.write('%s\n' % data)
|
||||
except OSError:
|
||||
pass
|
||||
if get_settings() & OUTPUT_TO_FILE and not sensitive:
|
||||
try:
|
||||
with open(_outputfile, "a+") as f:
|
||||
|
|
|
@ -39,7 +39,7 @@ def show_stats(o_inst):
|
|||
|
||||
# count stats
|
||||
'div2' : True,
|
||||
'Known Peers' : str(len(o_inst.onionrCore.listPeers()) - 1),
|
||||
'Known Peers' : str(len(o_inst.onionrCore.listPeers())),
|
||||
'Enabled Plugins' : str(len(o_inst.onionrCore.config.get('plugins.enabled', list()))) + ' / ' + str(len(os.listdir(o_inst.dataDir + 'plugins/'))),
|
||||
'Stored Blocks' : str(totalBlocks),
|
||||
'Percent Blocks Signed' : str(round(100 * signedBlocks / max(totalBlocks, 1), 2)) + '%'
|
||||
|
|
|
@ -438,7 +438,7 @@ class OnionrUtils:
|
|||
else:
|
||||
logger.warn('Failed to verify hash for %s' % block)
|
||||
if not exist:
|
||||
print('No blocks found to import')
|
||||
logger.info('No blocks found to import')
|
||||
|
||||
def progressBar(self, value = 0, endvalue = 100, width = None):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue