From 56c9d2e455e96c1d248cc36a88a8a66cf4eee9fe Mon Sep 17 00:00:00 2001 From: gluap Date: Mon, 10 Apr 2023 12:42:24 +0200 Subject: [PATCH] don't die if no argv is supplied. --- api/tools/import_regions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tools/import_regions.py b/api/tools/import_regions.py index 6d2d115..8649b92 100755 --- a/api/tools/import_regions.py +++ b/api/tools/import_regions.py @@ -86,7 +86,7 @@ async def main(): url = url.replace("+asyncpg", "") 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__":