# Path: glottolog3/cli_util.py
# def get_release(args, version):
#     for rel in get_releases(args):
#         if rel.version == version:
#             return rel


from glottolog3.cli_util import get_release
"""
Download the SQL dump of a specified Glottolog release
"""


def register(parser):  # pragma: no cover
    parser.add_argument('version', nargs='+', metavar='VERSION')


def run(args):  # pragma: no cover
    for version in args.version:

# Path: glottolog3/cli_util.py
# def get_release(args, version):
#     for rel in get_releases(args):
#         if rel.version == version:
#             return rel


# Path: glottolog3/commands/download_sqldump.py
from glottolog3.cli_util import get_release

"""
Download the SQL dump of a specified Glottolog release
"""


def register(parser):  # pragma: no cover
    parser.add_argument('version', nargs='+', metavar='VERSION')


def run(args):  # pragma: no cover
    for version in args.version:

        get_release(args, version).download_sql_dump(args.log)