From 49b61e476f418cc627cd40ca6aa5b8169ec48943 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 11 Sep 2020 14:06:01 -0400 Subject: [PATCH] msubprojects: Fix --types default value --- mesonbuild/msubprojects.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index 6329febe3..c06aa0b4b 100755 --- a/mesonbuild/msubprojects.py +++ b/mesonbuild/msubprojects.py @@ -6,6 +6,8 @@ from .mesonlib import quiet_git, verbose_git, GitException, Popen_safe, MesonExc from .wrap.wrap import API_ROOT, Resolver, WrapException, ALL_TYPES from .wrap import wraptool +ALL_TYPES_STRING = ', '.join(ALL_TYPES) + def update_wrapdb_file(wrap, repo_dir, options): patch_url = wrap.get('patch_url') branch, revision = wraptool.parse_patch_url(patch_url) @@ -257,8 +259,8 @@ def foreach(wrap, repo_dir, options): def add_common_arguments(p): p.add_argument('--sourcedir', default='.', help='Path to source directory') - p.add_argument('--types', default='', - help='Comma-separated list of subproject types. Supported types are: {} (default: all)'.format(', '.join(ALL_TYPES))) + p.add_argument('--types', default=ALL_TYPES_STRING, + help='Comma-separated list of subproject types. Supported types are: {} (default: all)'.format(ALL_TYPES_STRING)) def add_subprojects_argument(p): p.add_argument('subprojects', nargs='*', @@ -320,7 +322,7 @@ def run(options): types = [t.strip() for t in options.types.split(',')] for t in types: if t not in ALL_TYPES: - raise MesonException('Unknown subproject type {!r}, supported types are: {}'.format(t, ', '.join(ALL_TYPES))) + raise MesonException('Unknown subproject type {!r}, supported types are: {}'.format(t, ALL_TYPES_STRING)) failures = [] for wrap in wraps: if wrap.type not in types: