Re: pipe error
calmar <[email protected]> Wed, 8 Feb 2006 22:16:47 +0100
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Feb 08, 2006 at 04:40:03PM +0100, Bram Moolenaar wrote:
Hi Bram,
> diff -u -r1.28 Dictlist.py
> --- Dictlist.py 30 May 2005 11:38:36 -0000 1.28
> +++ Dictlist.py 8 Feb 2006 14:30:18 -0000
> @@ -357,7 +357,10 @@
[your patch]
> >
> > the -print0 thing, is the bad thing probably
>
> Yes, NULs in the pipe cause trouble.
Yeah, that catched it nicely with proper error message:
...stat() argument 1 must be (encoded string without NULL bytes), not str
>
> Aap also has a command that works like "find". Try the ":tree" command.
>
I tried this:
,----------------------------------------------
| gall {virtual} :
| galleryfiles =
| :tree gallery/Albums { skipdir = AAPDIR }
| :print $name
`----------------------------------------------
calmar@tuxli:~/www/calmar> aap gall
Aap: Internal Error
Aap: Traceback (most recent call last):
File "/usr/local/lib/aap/Exec-1.086/Process.py", line 1166, in Process
exec script_string in recdict, recdict
File "<string>", line 8, in ?
File "/usr/local/lib/aap/Exec-1.086/Commands.py", line 554, in aap_tree
cmd_line_nr, commands)
File "/usr/local/lib/aap/Exec-1.086/Commands.py", line 580, in aap_tree_recurse
cmd_line_nr, commands)
File "/usr/local/lib/aap/Exec-1.086/Commands.py", line 580, in aap_tree_recurse
cmd_line_nr, commands)
File "/usr/local/lib/aap/Exec-1.086/Commands.py", line 625, in aap_tree_recurse
Process(fp, recdict, 0)
File "/usr/local/lib/aap/Exec-1.086/Process.py", line 660, in Process
fp.nextline() # read the first line
File "/usr/local/lib/aap/Exec-1.086/ParsePos.py", line 75, in nextline
self.line = getline(self)
File "/usr/local/lib/aap/Exec-1.086/ParsePos.py", line 66, in getline
line = fp.file.readline()
AttributeError: 'str' object has no attribute 'readline'
Aap: Aborted
Aap: All messages are in the logfile: /var/www/calmar/AAPDIR/log
anyway, with a properly indented :print statement:
,-------------------------------------------
| :tree gallery/Albums { skipdir = AAPDIR }
| :print $name
`-------------------------------------------
it works very nicely!
Cool!
Thanks,
marco
--
calmar
(o_ It rocks: LINUX + Command-Line-Interface
//\
V_/_ http://www.calmar.ws
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642