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> Aap: Intern=
al Error<br>
Aap: Traceback (most recent call last):<br> &nb=
sp; File "/usr/lib/aap/Process.py", line 1163, in Process<br> &nb=
sp; exec script_string in recdict, recdict<br> &=
nbsp; File "<string>", line 46, in ?
<br> File "/usr/lib/aap/Commands.py", line 3=
098, in aap_progsearch<br> if " " in p=
rog:<br> TypeError: iterable argument required<br><br> =
Aap: Aborted<br> 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
2006-06-11 19:30:49.000000000 +0200<br>@@ -3086,7 +3086,7 @@<=
br> # Search for the programs, quit as soon as one is found.<=
br> prog =3D ''<br> for arg in args[1:]:<br>- &=
nbsp; prog =3D program_path(arg["name"])
<br>+ prog =3D program_path(arg["name"=
]) or ''<br> if prog:<br> =
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==--