don't die if no argv is supplied.

This commit is contained in:
gluap 2023-04-10 12:42:24 +02:00
parent c359d945da
commit 56c9d2e455
No known key found for this signature in database

View file

@ -86,7 +86,7 @@ async def main():
url = url.replace("+asyncpg", "") url = url.replace("+asyncpg", "")
async with await psycopg.AsyncConnection.connect(url) as connection: async with await psycopg.AsyncConnection.connect(url) as connection:
await import_nuts(connection, sys.argv[1]) await import_nuts(connection, sys.argv[1] if len(sys.argv) > 1 else None)
if __name__ == "__main__": if __name__ == "__main__":