Re: pipe error

Bram Moolenaar <[email protected]> Wed, 08 Feb 2006 16:40:03 +0100
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Calmar wrote:

> I was able to produce an Internal error:

Please try to include this patch and check if it now becomes a proper
error message.  Perhaps you can also see what went wrong in the recipe:

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 @@
             ret.append(dicty)
         else:
             # Expand wildcars.
-            exp =3D glob.glob(n)
+            try:
+                exp =3D glob.glob(n)
+            except StandardError, e:
+                raise UserError, (_("Error while expanding %s: ") % str(=
n)) + str(e)
             if not exp:
                 # If no match and has no wildcards: add without expandin=
g.
                 if not has_wildcard(n):


> Well, what I wanted to do, is replacing the (outcommented)
> pything instructions with :aap commands.
>=20
> the -print0 thing, is the bad thing probably

Yes, NULs in the pipe cause trouble.

> 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?)

Aap also has a command that works like "find".  Try the ":tree" command.

--=20
ARTHUR:      Who are you?
TALL KNIGHT: We are the Knights Who Say "Ni"!
BEDEVERE:    No!  Not the Knights Who Say "Ni"!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURE=
S LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \=
\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ =
\\\
\\\        download, build and distribute -- http://www.A-A-P.org        =
///
 \\\            help me help AIDS victims -- http://www.ICCF.nl         /=
//


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
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=3Dlnk&kid=3D103432&bid=3D230486&dat=3D=
121642