From b97c58a9a0eb4494208ec99ea73676354fd203a2 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Tue, 10 Jan 2023 15:02:21 +0100 Subject: 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. --- bin/just-import-git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/just-import-git.py') 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: -- cgit v1.2.3