<br><br><div><span class="gmail_quote">On 7/23/07, <b class="gmail_sendername">Alan Gauld</b> &lt;<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>&quot;Tino Dai&quot; &lt;<a href="mailto:tinoloc@gmail.com">tinoloc@gmail.com</a>&gt; wrote<br><br>&gt; Sorry about that. I think that a simpler question would be:<br><br>I&#39;m not sure what the better question is, but I think I
<br>answered it :-)<br><br>&gt; In my driver code:<br>&gt;<br>&gt;&nbsp;&nbsp;ap = apacheModule.apacheModule(configXML)<br>&gt;&nbsp;&nbsp;while 1:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rVs=ap.perf()<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for anObj in self.objList:
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; getattr(anObj,&quot;do&quot;)(rVs)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time.sleep(1)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;except ArraryOutOfBoundsException:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pass<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; except Exception, e:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sys.stdout.write
(str(e) + &quot;\n&quot;)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sys.exit(1)<br>&gt;<br>&gt;<br>&gt; And in my apacheModule class:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try:<br>&gt;<br>&gt; (totalAccess,totalTraffic)=(rVs[3][1],self.sizeConvert ...<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; except Exception,e:
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;datetime.datetime.now()<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sys.stdout.write(str(e) + &quot;\n&quot;)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sys.stdout.write(rVs)<br>&gt;<br>&gt; If the apacheModule raises an ArrayOutOfBound exception (don&#39;t
<br>&gt; remember if that the real exception name), the exception will bubble<br>&gt; up, and<br>&gt; the apacheDriver try-except will catch it, right?<br><br>No, if you catch it here, as you will if you catch all Exceptions,
<br>then<br>it will stop right there unless you explicitly raise it. You bneed to<br>add a<br>raise statement after the stdout.write stuff.<br><br>Alan G.</blockquote><div><br>Thanks Alan,<br><br>&nbsp;&nbsp;&nbsp; That makes a lot of sense. I will be see what I can do tomorrow with a revision of the code.
<br><br>Thanks again,<br>Tino<br><br></div><br></div>