Skip to content

Commit

Permalink
Change python->python2 in prepare.sh, fix exits
Browse files Browse the repository at this point in the history
Signed-off-by: kamilsa <[email protected]>
  • Loading branch information
kamilsa committed Dec 27, 2017
1 parent 8095af3 commit 20999ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions example/python/prepare.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env bash

cd $(dirname $0)

# generate iroha lib
cmake -DSWIG_PYTHON=ON ../..
make _iroha

# generate proto files in current dir
protoc --proto_path=../../schema --python_out=. block.proto primitive.proto commands.proto queries.proto responses.proto endpoint.proto yac.proto ordering.proto loader.proto
python -m grpc_tools.protoc --proto_path=../../schema --python_out=. --grpc_python_out=. endpoint.proto yac.proto ordering.proto loader.proto
protoc --proto_path=../../schema --python_out=. block.proto primitive.proto commands.proto queries.proto responses.proto endpoint.proto
python2 -m grpc_tools.protoc --proto_path=../../schema --python_out=. --grpc_python_out=. endpoint.proto yac.proto ordering.proto loader.proto
5 changes: 3 additions & 2 deletions example/python/tx-example.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

if status != "COMMITTED":
print("Your transaction wasn't committed")
exit()
exit(1)

query = queryBuilder.creatorAccountId(creator) \
.createdTime(current_time) \
Expand All @@ -78,7 +78,7 @@

if not query_response.HasField("asset_response"):
print("Query response error")
exit(0)
exit(1)
else:
print("Query responsed with asset response")

Expand All @@ -87,3 +87,4 @@
print("Precision =", asset_info.precision)

print("done!")
exit(0)

0 comments on commit 20999ad

Please sign in to comment.