diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-09-19 21:20:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-19 21:20:02 +0300 |
commit | 1556b1bdb0c5f94f2e3f2f0ebc59c8d9afeddc1c (patch) | |
tree | 3fb5c9c681bf7071c0765c0f2d55d067a27d70ce /mesonbuild/dependencies/base.py | |
parent | 9c834a4ecddfa6ba38249be501d0ad1b481e48b1 (diff) | |
parent | e553d0807bad5db8290e26954ce7634bc0e181fd (diff) | |
download | meson-1556b1bdb0c5f94f2e3f2f0ebc59c8d9afeddc1c.zip meson-1556b1bdb0c5f94f2e3f2f0ebc59c8d9afeddc1c.tar.gz meson-1556b1bdb0c5f94f2e3f2f0ebc59c8d9afeddc1c.tar.bz2 |
Merge pull request #2264 from jeandet/master
Some refactoring, introduction of listify function.
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r-- | mesonbuild/dependencies/base.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index cc4837a..7c7f986 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -23,7 +23,7 @@ from enum import Enum from .. import mlog from .. import mesonlib -from ..mesonlib import MesonException, Popen_safe, flatten, version_compare_many +from ..mesonlib import MesonException, Popen_safe, flatten, version_compare_many, listify # These must be defined in this file to avoid cyclical references. @@ -374,10 +374,7 @@ class ExternalProgram: def __init__(self, name, command=None, silent=False, search_dir=None): self.name = name if command is not None: - if not isinstance(command, list): - self.command = [command] - else: - self.command = command + self.command = listify(command) else: self.command = self._search(name, search_dir) if not silent: |