Christoph Zwerschke wrote:
> Ian Bicking wrote:
>>> Or is there a better way to skip individual files?
>> Yes, in the template itself you can do skip_template(), which raises an 
>> exception that tells copydir to skip the file.
> 
> Thanks a lot. That is a really useful feature.
> 
> However, when I tried this, I got the following traceback:
> 
> ---
> 
>    File "../pastescript-1.3.4-py2.5.egg/paste/script/copydir.py",
>      line 273, in substitute_content
>        _add_except(e, ' in file %s' % filename)
>    File "../pastescript-1.3.4-py2.5.egg/paste/script/copydir.py",
>      line 342, in _add_except
>        args[0] += ' ' + info
> IndexError: list index out of range
> 
> ---
> 
> I suggest changing the line
> 
>      args[0] += ' ' + info
> 
> into
> 
>      if args:
>          args[0] += ' ' + info
>      else:
>          args = [info]
> 
> After I did this, everything worked nicely.
> 
> Any idea for a workaround for the current paste version?

That fix is in trunk now.  What kind of exception is it exactly?  It 
would have to have a .args of (), as no .args won't trigger this case. 
I have code that uses skip_template() and it works fine.  Unless maybe I 
haven't tested it on Python 2.5, and something changed there.


-- 
Ian Bicking : [EMAIL PROTECTED] : http://blog.ianbicking.org

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to