TypeError when progsearch does not find any program

"Olivier Laurent" <[email protected]> Thu, 17 Aug 2006 09:56:29 +0200
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
--===============1397480124==
Content-Type: multipart/alternative; 
	boundary="----=_Part_156521_13557051.1155801389289"

------=_Part_156521_13557051.1155801389289
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

If the 'progsearch' command does not find any program, Python raises a
TypeError in 'Commands.py', line =B13098 with aap version 1.072.

Here is the output:
   Aap: Internal Error
   Aap: Traceback (most recent call last):
      File "/usr/lib/aap/Process.py", line 1163, in Process
       exec script_string in recdict, recdict
      File "<string>", line 46, in ?
      File "/usr/lib/aap/Commands.py", line 3098, in aap_progsearch
       if " " in prog:
    TypeError: iterable argument required

   Aap: Aborted
   Aap: More info in the logfile: /[...]/AAPDIR/log

The 'in' Python operator only accepts iterable and None is not an
iterable.

Here is a patch that you can use if you want:

--- Commands.py 2006-06-11 19:31:05.000000000 +0200
+++ Commands.py.orig    2006-06-11 19:30:49.000000000 +0200
@@ -3086,7 +3086,7 @@
    # Search for the programs, quit as soon as one is found.
    prog =3D ''
    for arg in args[1:]:
-        prog =3D program_path(arg["name"])
+        prog =3D program_path(arg["name"]) or ''
        if prog:
            break

--
Olivier Laurent

------=_Part_156521_13557051.1155801389289
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div style=3D"direction: ltr;">If the 'progsearch' command does not find an=
y program, Python raises a<br>TypeError in 'Commands.py', line =B13098 with=
 aap version 1.072.<br><br>Here is the output:<br> &nbsp; &nbsp;Aap: Intern=
al Error<br>
 &nbsp; &nbsp;Aap: Traceback (most recent call last):<br> &nbsp; &nbsp; &nb=
sp; File &quot;/usr/lib/aap/Process.py&quot;, line 1163, in Process<br> &nb=
sp; &nbsp; &nbsp; &nbsp;exec script_string in recdict, recdict<br> &nbsp; &=
nbsp; &nbsp; File &quot;&lt;string&gt;&quot;, line 46, in ?
<br> &nbsp; &nbsp; &nbsp; File &quot;/usr/lib/aap/Commands.py&quot;, line 3=
098, in aap_progsearch<br> &nbsp; &nbsp; &nbsp; &nbsp;if &quot; &quot; in p=
rog:<br> &nbsp; &nbsp; TypeError: iterable argument required<br><br> &nbsp;=
 &nbsp;Aap: Aborted<br> &nbsp; &nbsp;Aap: More info in the logfile: /[...]/=
AAPDIR/log
<br><br>The 'in' Python operator only accepts iterable and None is not an<b=
r>iterable.<br><br>Here is a patch that you can use if you want:<br><br>---=
 Commands.py 2006-06-11 19:31:05.000000000 +0200<br>+++ Commands.py.orig
 &nbsp; &nbsp;2006-06-11 19:30:49.000000000 +0200<br>@@ -3086,7 +3086,7 @@<=
br> &nbsp; &nbsp; # Search for the programs, quit as soon as one is found.<=
br> &nbsp; &nbsp; prog =3D ''<br> &nbsp; &nbsp; for arg in args[1:]:<br>- &=
nbsp; &nbsp; &nbsp; &nbsp;prog =3D program_path(arg[&quot;name&quot;])
<br>+ &nbsp; &nbsp; &nbsp; &nbsp;prog =3D program_path(arg[&quot;name&quot;=
]) or ''<br> &nbsp; &nbsp; &nbsp; &nbsp; if prog:<br> &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; break<br></div><span class=3D"sg"><br>--<br>Olivier La=
urent</span>

------=_Part_156521_13557051.1155801389289--


--===============1397480124==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--===============1397480124==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
A-A-P-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/a-a-p-develop

--===============1397480124==--