From ed840173bf1baca199eced90ad5843eac200118c Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 31 Aug 2023 12:52:33 +0200 Subject: just-mr.py: Fix wrong check added by type annotation changes The checkout locations keys can, of course, include the empty string, so key check should be explicitly typed. --- bin/just-mr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/just-mr.py') diff --git a/bin/just-mr.py b/bin/just-mr.py index be845f83..b7a6162d 100755 --- a/bin/just-mr.py +++ b/bin/just-mr.py @@ -194,7 +194,7 @@ def read_config(configfile: str) -> Json: def git_root(*, upstream: Optional[str]) -> str: - if upstream and upstream in g_GIT_CHECKOUT_LOCATIONS: + if upstream is not None and upstream in g_GIT_CHECKOUT_LOCATIONS: return g_GIT_CHECKOUT_LOCATIONS[upstream] elif upstream and os.path.isabs(upstream) and os.path.isdir(upstream): return upstream -- cgit v1.2.3