build: fixed EXPAND_VARIABLES() for env expansion
authorAndrew Tridgell <tridge@samba.org>
Fri, 26 Mar 2010 22:46:27 +0000 (09:46 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:27:09 +0000 (20:27 +1000)
buildtools/wafsamba/samba_utils.py

index 1b21d7308c2006f0f0c99022a6423e2a1323bf9d..753a6a7034754427e3133c10786cd92c16e7c0a0 100644 (file)
@@ -361,7 +361,7 @@ def EXPAND_VARIABLES(ctx, varstr, vars=None):
         ret = SUBST_VARS_RECURSIVE(ret, env)
 
     # if anything left, subst on the environment as well
-    if ret.find('${'):
+    if ret.find('${') != -1:
         ret = SUBST_VARS_RECURSIVE(ret, ctx.env)
     # make sure there is nothing left. Also check for the common
     # typo of $( instead of ${
@@ -417,3 +417,4 @@ except:
         Utils.md5 = replace_md5
         Task.md5 = replace_md5
         Utils.h_file = replace_h_file
+