Bug 1258785 - Return a None value when check_prog doesn't find a program. r?ted draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 23 Mar 2016 09:48:38 +0900
changeset 343654 35140f3dd988a7a7138943d7d594b87c7c0c8cc9
parent 343653 43d66eea833b04be65a145051c708dd5c6587a80
child 516807 bc824172f9ab13655ecbcdfc64af8641f9f5e87f
push id13661
push userbmo:mh+mozilla@glandium.org
push dateWed, 23 Mar 2016 00:49:41 +0000
reviewersted
bugs1258785
milestone48.0a1
Bug 1258785 - Return a None value when check_prog doesn't find a program. r?ted
build/moz.configure/checks.configure
--- a/build/moz.configure/checks.configure
+++ b/build/moz.configure/checks.configure
@@ -70,10 +70,11 @@ def check_prog(var, progs, allow_missing
     @depends(check)
     @advanced
     def postcheck(value):
         set_config(var, ':' if value is not_found else value)
         if value is not_found and not allow_missing:
             from mozbuild.shellutil import quote
             error('Cannot find %s (tried: %s)'
                   % (var.lower(), ', '.join(quote(p) for p in progs)))
+        return None if value is not_found else value
 
-    return check
+    return postcheck