Bug 1258785 - Return a None value when check_prog doesn't find a program. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 23 Mar 2016 09:48:38 +0900
changeset 313751 9056b43dc7b12acb9a1bf9178561f28b3ffccf51
parent 313750 22615a6fd646b7eb53cd2d1a3be5bf3d22aa0906
child 313752 bbfbdaa25c6cc26f122a4eafbe84c61d381682d8
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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