Added some log_error stuff....<br><br>Also added  reslist.append(c.get_results()) to the c.run() try/except. This should grab the results for passing to the server properly if exception is raised.<br><br>Added the state of initialized to the client_info dict, so we can see status of that on web interface also.<br>
<br>Then just an extra thought to throw out there....<br><br>Do we want to provide a higher level of feedback somehow on the web side? Do we want to store the log data for reporting if they choose to use -v or --debug? To a file to upload?<br>
<br>Max<br><br><div class="gmail_quote">On Thu, Apr 22, 2010 at 4:06 PM, C. Titus Brown <span dir="ltr">&lt;<a href="mailto:ctb@msu.edu">ctb@msu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Thu, Apr 22, 2010 at 03:49:07PM -0400, Max Laite wrote:<br>
&gt; env<br>
&gt;<br>
&gt; Tests:<br>
&gt; <a href="http://github.com/mlaite/pony-build/commit/3b3e53d15f0f8a83b927310507c8fb3095d813e9" target="_blank">http://github.com/mlaite/pony-build/commit/3b3e53d15f0f8a83b927310507c8fb3095d813e9</a><br>
&gt;<br>
&gt; pony_client:<br>
&gt; <a href="http://github.com/mlaite/pony-build/commit/150e3e1acab9cc78d13e85d181e3c705520b16a4" target="_blank">http://github.com/mlaite/pony-build/commit/150e3e1acab9cc78d13e85d181e3c705520b16a4</a><br>
<br>
</div>Hey Max,<br>
<br>
a couple of comments :)<br>
<br>
--<br>
<br>
&#39;init_status&#39; is not very clear as a flag name goes.  Maybe &#39;initialized&#39;?<br>
<br>
--<br>
<br>
How about creating a new context object of type &#39;Context&#39; if context is None<br>
in the &#39;do&#39; function?  &#39;Context&#39; does a bunch of useful stuff, and it would<br>
simplify all of your &#39;if&#39; statements down to one &#39;if&#39; at the beginning:<br>
<br>
        if context is None:<br>
                context = Context()<br>
<br>
--<br>
<br>
try/except with blanket &#39;except&#39; and no reporting, e.g.<br>
<br>
        try:<br>
                # foo bar baz<br>
        except:<br>
                # cleanup with no reporting<br>
<br>
is a Bad Idea.  I see a few problems with your code:<br>
<br>
 - &#39;success&#39; may still be set to True even if a c.run() call raises an<br>
   exception.<br>
<br>
 - there&#39;s no logging whatsoever; at the very least every &#39;except&#39; branch<br>
   should have some sort of log_error call.  Right now the excepts will<br>
   catch everything, including genuine programming errors, silently!<br>
<br>
--<br>
<br>
Hmm, that&#39;s enough for now...<br>
<br>
thanks,<br>
<font color="#888888">--titus<br>
</font></blockquote></div><br>