Very helpful. Thanks. Will report back when I sit down to mess around with it later.<br><br>Max<br><br><div class="gmail_quote">On Wed, Feb 10, 2010 at 12:25 PM, Rosangela Canino-Koning <span dir="ltr">&lt;<a href="mailto:rosiec@voidptr.net">rosiec@voidptr.net</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;">Backing up, how much of a failure do you want? Do you want this thing to messily grind to a halt, or do you want it to try to deal with the error somewhat gracefully?<br>
<br>If pip failing to install a dependency is a massive deal-breaker for the whole system, which, further, you never really expect to happen, but you don&#39;t want it to fail silently, use an assert.<br>

<br>If pip failing to install a dependency is a rare error, but you need to clean up after yourself at a higher level before shutting down, then throw an exception, and catch it upstream.<br><br>Finally, if pip failing is an expected part of the program flow, and there are ways to gracefully handle the error, and continue processing, then check pip&#39;s return status (or catch it if it&#39;s an exception), do whatever, and continue processing.<br>


<br>Any of these strategies can be implemented with either pip returning a status code, or with pip throwing an exception. It&#39;s what you do with it that really matters.<br><br>-rose<div><div></div><div class="h5"><br>
<br><div class="gmail_quote">On Wed, Feb 10, 2010 at 11:14 AM, C. Titus Brown <span dir="ltr">&lt;<a href="mailto:ctb@msu.edu" target="_blank">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;">subprocess returncode/status code == 0 =&gt; success<br>
<div><div></div><div><br>
On Wed, Feb 10, 2010 at 11:13:20AM -0500, Rosangela Canino-Koning wrote:<br>
&gt; Asserts are typically the preferred method for this. What kind of error does<br>
&gt; pip return (or throw?) if it fails to install?<br>
&gt;<br>
&gt; -rose<br>
&gt;<br>
&gt; On Wed, Feb 10, 2010 at 10:50 AM, Max Laite &lt;<a href="mailto:mlaite@gmail.com" target="_blank">mlaite@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; I been thinking on some stuff to make virtualenv fail if pip can not<br>
&gt; &gt; install a dep. I have a few ideas, but the easiest would be to use a simple<br>
&gt; &gt; try block. I wanted to pass it by you guys to see if I am missing something<br>
&gt; &gt; in my thought process behind this.<br>
&gt; &gt;<br>
&gt; &gt; The other way was to catch the output from pip and parse for failed or<br>
&gt; &gt; something like that.<br>
&gt; &gt;<br>
&gt; &gt; Max<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; pony-build mailing list<br>
&gt; &gt; <a href="mailto:pony-build@lists.idyll.org" target="_blank">pony-build@lists.idyll.org</a><br>
&gt; &gt; <a href="http://lists.idyll.org/listinfo/pony-build" target="_blank">http://lists.idyll.org/listinfo/pony-build</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; pony-build mailing list<br>
&gt; <a href="mailto:pony-build@lists.idyll.org" target="_blank">pony-build@lists.idyll.org</a><br>
&gt; <a href="http://lists.idyll.org/listinfo/pony-build" target="_blank">http://lists.idyll.org/listinfo/pony-build</a><br>
<br>
<br>
</div></div><font color="#888888">--<br>
C. Titus Brown, <a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a><br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>