diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2019-04-22 15:54:16 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2019-04-25 12:28:51 -0700 |
| commit | 5678468c2cc1f4639c68a95fb71f8212c846459b (patch) | |
| tree | eeedb656ffa320932b052043355e297809b90633 /mesonbuild/scripts/meson_exe.py | |
| parent | 8e1670cc60cc853c7ddc81dceb65dc93fa45bfa9 (diff) | |
| download | meson-5678468c2cc1f4639c68a95fb71f8212c846459b.tar.gz | |
Don't use len() to test for container emptiness
I ran the numbers once before (it's in the meson history) but it's
*much* faster to *not* use len for testing if a container is empty or
not.
Diffstat (limited to 'mesonbuild/scripts/meson_exe.py')
| -rw-r--r-- | mesonbuild/scripts/meson_exe.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/scripts/meson_exe.py b/mesonbuild/scripts/meson_exe.py index 23c7334ab..a862ec567 100644 --- a/mesonbuild/scripts/meson_exe.py +++ b/mesonbuild/scripts/meson_exe.py @@ -60,7 +60,7 @@ def run_exe(exe): cmd = exe.fname child_env = os.environ.copy() child_env.update(exe.env) - if len(exe.extra_paths) > 0: + if exe.extra_paths: child_env['PATH'] = (os.pathsep.join(exe.extra_paths + ['']) + child_env['PATH']) if exe.exe_runner and mesonlib.substring_is_in_list('wine', exe.exe_runner.get_command()): |
