diff options
author | Jonathan Chan <jyc@eqv.io> | 2017-06-22 14:43:12 -0700 |
---|---|---|
committer | Jonathan Chan <jyc@eqv.io> | 2017-06-22 14:45:30 -0700 |
commit | 260c41aeea9697a867cbd0a6abdae9bb95f3a5d3 (patch) | |
tree | 51c9f73f9cb1825687e84b1b63493c86b466aa15 /python/servo/command_base.py | |
parent | b9d66df2f5d23ea85fbfb19e3cbc7ec88259390f (diff) | |
download | servo-260c41aeea9697a867cbd0a6abdae9bb95f3a5d3.tar.gz servo-260c41aeea9697a867cbd0a6abdae9bb95f3a5d3.zip |
mach: Fail properly if we can't find the path for OSMesa or GLAPI.
Currently we check `if not (osmesa_path and glapi_path)` after using
`path.join`. It seems we actually want to check whether
`find_dep_path_newest` returns something, because if calls to that
function fail, we'll instead get an error from `path.join` about
`NoneType` not having attribute `endswith` (it expects a string), which
preempts this check.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index e58a862245d..e8bad0a742f 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -189,12 +189,13 @@ def set_osmesa_env(bin_path, env): env["LD_LIBRARY_PATH"] = osmesa_path env["GALLIUM_DRIVER"] = "softpipe" elif is_macosx(): - osmesa_path = path.join(find_dep_path_newest('osmesa-src', bin_path), + osmesa_dep_path = find_dep_path_newest('osmesa-src', bin_path) + if not osmesa_dep_path: + return None + osmesa_path = path.join(osmesa_dep_path, "out", "src", "gallium", "targets", "osmesa", ".libs") - glapi_path = path.join(find_dep_path_newest('osmesa-src', bin_path), + glapi_path = path.join(osmesa_dep_path, "out", "src", "mapi", "shared-glapi", ".libs") - if not (osmesa_path and glapi_path): - return None env["DYLD_LIBRARY_PATH"] = osmesa_path + ":" + glapi_path env["GALLIUM_DRIVER"] = "softpipe" return env |