Skip to content
Snippets Groups Projects
Commit 3b74f76f authored by inso's avatar inso
Browse files

Fix await response

parent b216488e
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ async def main():
if response.status == 200:
print(await response.text())
else:
print("Error while publishing identity : {0}".format(response.text()))
print("Error while publishing identity : {0}".format(await response.text()))
response.close()
# Latest duniter-python-api is asynchronous and you have to use asyncio, an asyncio loop and a "as" on the data.
......
......@@ -119,7 +119,7 @@ async def main():
if response.status == 200:
print(await response.text())
else:
print("Error while publishing certification : {0}".format(response.text()))
print("Error while publishing certification : {0}".format(await response.text()))
response.close()
with AIOHTTP_SESSION:
......
......@@ -122,7 +122,7 @@ async def main():
if response.status == 200:
print(await response.text())
else:
print("Error while publishing membership : {0}".format(response.text()))
print("Error while publishing membership : {0}".format(await response.text()))
response.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment