mirror of
https://github.com/logos-storage/codex-factory.git
synced 2026-01-02 13:03:07 +00:00
refactor: make connection check be compatible with both python 2 and 3
This commit is contained in:
parent
9a34ba2ff9
commit
0ecd8974ce
@ -57,7 +57,7 @@ log_queen() {
|
||||
}
|
||||
|
||||
count_connected_peers() {
|
||||
COUNT=$( curl -s http://localhost:1635/peers | python -c 'import json,sys; obj=json.load(sys.stdin); print len(obj["peers"]);' )
|
||||
COUNT=$( curl -s http://localhost:1635/peers | python -c 'import json,sys; obj=json.load(sys.stdin); print (len(obj["peers"]));' )
|
||||
|
||||
echo "$COUNT"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user