aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorAlexis Jeandet <alexis.jeandet@member.fsf.org>2017-09-18 22:19:12 +0200
committerAlexis Jeandet <alexis.jeandet@member.fsf.org>2017-09-18 22:25:34 +0200
commite553d0807bad5db8290e26954ce7634bc0e181fd (patch)
tree3fb5c9c681bf7071c0765c0f2d55d067a27d70ce /mesonbuild/dependencies/base.py
parentbf64cf569b6ecf90db0f2bb181edb8f0ff0c9a3b (diff)
downloadmeson-e553d0807bad5db8290e26954ce7634bc0e181fd.zip
meson-e553d0807bad5db8290e26954ce7634bc0e181fd.tar.gz
meson-e553d0807bad5db8290e26954ce7634bc0e181fd.tar.bz2
Last round with listify function refactoring.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py7
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: