summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-08-31 13:16:53 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-08-31 13:16:53 +0200
commit63935446b15874a4f4ec98ab7dcf80bfdac3ced2 (patch)
treef96005ed69640f1f6787ec19e05662785b06715c /bin
parented840173bf1baca199eced90ad5843eac200118c (diff)
downloadjustbuild-63935446b15874a4f4ec98ab7dcf80bfdac3ced2.tar.gz
just-mr.py: Fix None checks
Diffstat (limited to 'bin')
-rwxr-xr-xbin/just-mr.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/just-mr.py b/bin/just-mr.py
index b7a6162d..3eade552 100755
--- a/bin/just-mr.py
+++ b/bin/just-mr.py
@@ -717,19 +717,19 @@ def setup(*,
repos_to_include = repos.keys()
mr_config: Json = {}
- if main == None:
+ if main is None:
main = config.setdefault("main", None)
- if not isinstance(main, str) and main != None:
+ if not isinstance(main, str) and main is not None:
fail("Unsupported value for field 'main' in configuration.")
- if main != None:
+ if main is not None:
# pass on main that was explicitly set via command line or config
mr_config["main"] = main
- if main == None and len(repos_to_setup) > 0:
+ if main is None and len(repos_to_setup) > 0:
main = sorted(list(repos_to_setup))[0]
- if main != None and not setup_all:
+ if main is not None and not setup_all:
repos_to_include, repos_to_setup = reachable_repositories(main,
repos=repos)
@@ -835,9 +835,9 @@ def fetch(*,
repos_to_fetch = repos.keys()
if not fetch_all:
- if main == None and len(repos_to_fetch) > 0:
+ if main is None and len(repos_to_fetch) > 0:
main = sorted(list(repos_to_fetch))[0]
- if main != None:
+ if main is not None:
repos_to_fetch = reachable_repositories(main, repos=repos)[0]
def is_subpath(path: str, base: str) -> bool:
@@ -848,7 +848,7 @@ def fetch(*,
g_WORKSPACE_ROOT):
repo = repos.get(main, {}).get("repository", {})
repo_path = repo.get("path", None)
- if repo_path != None and repo.get("type", None) == "file":
+ if repo_path is not None and repo.get("type", None) == "file":
if not os.path.isabs(repo_path):
repo_path = os.path.realpath(
os.path.join(cast(str, g_SETUP_ROOT), repo_path))