Re: Possible bug

Wytze van der Raay <[email protected]> Thu, 04 Dec 2003 10:29:43 +0100
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Tim Hemel wrote:

> ...
> install:
>         :print $Subdirs
>         @for d in expand2list(Subdirs):
>                 :print $d
>                 :execute $d/main.aap install
> ...
> $ aap install
> ...
> Aap: Error in recipe "/usr/home/tim/soekris/main.aap" line 20: NameError: name 'Subdirs' is not defined
> 
> Why is this variable not defined in that particular place, but is defined in
> all the others?

See http://www.a-a-p.org/exec/ref-varscope.html#id3020160
Your example will work as expected when you write:

	@for d in expand2list(_no.Subdirs):

for reasons better explained by Bram ...

Regards,
-- wytze



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/