pipe error
calmar <[email protected]> Wed, 8 Feb 2006 14:32:16 +0100
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I was able to produce an Internal error:
Aap: Internal Error
Aap: Traceback (most recent call last):
File "/usr/local/lib/aap/Exec-1.080/Process.py", line 1166, in Process
exec script_string in recdict, recdict
File "<string>", line 8, in ?
File "/usr/local/lib/aap/Exec-1.080/Commands.py", line 1399, in aap_attr
aap_attribute(line_nr, recdict, arg)
File "/usr/local/lib/aap/Exec-1.080/Commands.py", line 1413, in aap_attribute
argdictlist = dictlist_expand(argdictlist)
File "/usr/local/lib/aap/Exec-1.080/Dictlist.py", line 360, in dictlist_expand
exp = glob.glob(n)
File "/usr/lib/python2.3/glob.py", line 16, in glob
if os.path.exists(pathname):
File "/usr/lib/python2.3/posixpath.py", line 174, in exists
st = os.stat(path)
TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str
Aap: Aborted
Aap: More info in the logfile: /var/www/calmar/AAPDIR/log
that was on that recipe:
gall {virtual} :
# @import commands, sre
# @galleryfiles = commands.getoutput("find gallery/Albums/ -iname 'AAPDIR' -prune -o -type f -print")
# @galleryfiles = galleryfiles.replace("\n","' '") # replace newline with ' '
# @galleryfiles = sre.sub("^","'",galleryfiles) # add a ' at the begin
# @galleryfiles = sre.sub("$","'",galleryfiles) # add a ' at the end
:syseval find gallery/Albums/ -iname 'AAPDIR' -prune -o -type f -print0 | :assign galleryfiles
:attr { publish = ftp://n4a403:[email protected]/html/calmar/%file% } $galleryfiles
:publish $galleryfiles
Well, what I wanted to do, is replacing the (outcommented)
pything instructions with :aap commands.
the -print0 thing, is the bad thing probably
When I'm already writing here, even so, the python commmands do
the trick, how would I get a gnu-find output (with files including
spaces...) into a aap variables (consisting of those files?)
Cheers and 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