Changeset View
Changeset View
Standalone View
Standalone View
swh/core/cli/db.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (C) 2018 The Software Heritage developers | # Copyright (C) 2018-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import glob | import glob | ||||
import logging | import logging | ||||
from os import path, environ | from os import path, environ | ||||
import subprocess | import subprocess | ||||
import warnings | import warnings | ||||
warnings.filterwarnings("ignore") # noqa prevent psycopg from telling us sh*t | |||||
import click | import click | ||||
from swh.core.cli import CONTEXT_SETTINGS | from swh.core.cli import CONTEXT_SETTINGS | ||||
from swh.core.config import read as config_read | from swh.core.config import read as config_read | ||||
warnings.filterwarnings("ignore") # noqa prevent psycopg from telling us sh*t | |||||
logger = logging.getLogger(__name__) | logger = logging.getLogger(__name__) | ||||
@click.group(name="db", context_settings=CONTEXT_SETTINGS) | @click.group(name="db", context_settings=CONTEXT_SETTINGS) | ||||
@click.option( | @click.option( | ||||
"--config-file", | "--config-file", | ||||
"-C", | "-C", | ||||
default=None, | default=None, | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |