diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-01-10 15:02:21 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-01-10 15:34:08 +0100 |
commit | b97c58a9a0eb4494208ec99ea73676354fd203a2 (patch) | |
tree | 4da40f3680e0763687f5c70a884b2b9b14cf79a5 /bin/just-import-git.py | |
parent | e98893681f9a1d534a88401c00d8fda845e667ea (diff) | |
download | justbuild-b97c58a9a0eb4494208ec99ea73676354fd203a2.tar.gz |
just-import-git: fix check for main name
The main repository to be imported should be treated special,
whenever given. This has to be verified as the parameter not being
None, rather than being true, as the empty string (a traditional
name for the main repository) is also a false value in python.
Diffstat (limited to 'bin/just-import-git.py')
-rwxr-xr-x | bin/just-import-git.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/just-import-git.py b/bin/just-import-git.py index 9b9f1023..51603696 100755 --- a/bin/just-import-git.py +++ b/bin/just-import-git.py @@ -186,7 +186,7 @@ def name_imports(to_import, existing, base_name, main=None): if (candidate not in existing) and (candidate not in assign): return candidate - if main and (base_name not in existing): + if main is not None and (base_name not in existing): assign[main] = base_name to_import = [x for x in to_import if x != main] for repo in to_import: |