Page MenuHomeSoftware Heritage

D3914.id.diff
No OneTemporary

D3914.id.diff

diff --git a/swh/lister/cli.py b/swh/lister/cli.py
--- a/swh/lister/cli.py
+++ b/swh/lister/cli.py
@@ -1,18 +1,18 @@
-# Copyright (C) 2018-2019 The Software Heritage developers
+# Copyright (C) 2018-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
+# WARNING: do not import unnecessary things here to keep cli startup time under
+# control
import os
import logging
from copy import deepcopy
import click
-from sqlalchemy import create_engine
from swh.core.cli import CONTEXT_SETTINGS
from swh.lister import get_lister, SUPPORTED_LISTERS, LISTERS
-from swh.lister.core.models import initialize
logger = logging.getLogger(__name__)
@@ -81,6 +81,8 @@
"""Initialize the database model for given listers.
"""
+ from sqlalchemy import create_engine
+ from swh.lister.core.models import initialize
cfg = ctx.obj["config"]
lister_cfg = cfg["lister"]

File Metadata

Mime Type
text/plain
Expires
Nov 5 2024, 3:43 PM (11 w, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3217673

Event Timeline