database script
This commit is contained in:
parent
b39aac8fd2
commit
27f145cd6d
|
@ -1,7 +1,7 @@
|
|||
import asyncpg
|
||||
import asyncio
|
||||
from os.path import isfile
|
||||
from sys import init
|
||||
from sys import exit
|
||||
|
||||
|
||||
from risotto.config import get_config
|
||||
|
@ -17,7 +17,7 @@ async def main():
|
|||
async with pool.acquire() as connection:
|
||||
async with connection.transaction():
|
||||
with open(sql_filename, 'r') as sql:
|
||||
await connection.execute(sql.read().decode())
|
||||
await connection.execute(sql.read())
|
||||
|
||||
if __name__ == '__main__':
|
||||
loop = asyncio.get_event_loop()
|
||||
|
|
Loading…
Reference in New Issue