diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-15 08:51:44 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-09-16 01:32:19 +0300 |
commit | a4a53237f1902c67afdafa9ab25b7baddf4ef43e (patch) | |
tree | e07fa293dc0cb84c2c2ef5e4915193da4a7aa54a | |
parent | a24fde6fde774092fae7ec544b85ca794baadeb8 (diff) | |
download | meson-a4a53237f1902c67afdafa9ab25b7baddf4ef43e.zip meson-a4a53237f1902c67afdafa9ab25b7baddf4ef43e.tar.gz meson-a4a53237f1902c67afdafa9ab25b7baddf4ef43e.tar.bz2 |
envconfig: fix return type of get_env_var_pair
It doesn't return (None, None), it returns just None.
-rw-r--r-- | mesonbuild/envconfig.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 6a813b8..8eaf9e4 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py @@ -85,7 +85,7 @@ CPU_FAMILES_64_BIT = [ def get_env_var_pair(for_machine: MachineChoice, is_cross: bool, - var_name: str) -> T.Tuple[T.Optional[str], T.Optional[str]]: + var_name: str) -> T.Optional[T.Tuple[str, str]]: """ Returns the exact env var and the value. """ @@ -115,9 +115,7 @@ def get_env_var(for_machine: MachineChoice, ret = get_env_var_pair(for_machine, is_cross, var_name) if ret is None: return None - else: - var, value = ret - return value + return ret[1] class Properties: def __init__( |