<br><br><div class="gmail_quote">On Tue, May 12, 2009 at 12:25 AM, Alexander Belchenko <span dir="ltr">&lt;<a href="mailto:bialix@ukr.net">bialix@ukr.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;">
BB:resubmit<br>
<br>
General rule for bzr (and most python program IMO) is: don&#39;t use bare except, because it has undesirable effect of catching ALL errors.<br>
We know what error we want to ignore (OSError) so we should explicitly use it in except.<br>
<br>
--- bzrlib/diff.py      2009-03-28 02:10:54 +0000<br>
+++ bzrlib/diff.py      2009-05-12 05:31:39 +0000<br>
@@ -731,7 +731,10 @@<br>
         return old_disk_path, new_disk_path<br>
<br>
     def finish(self):<br>
-        osutils.rmtree(self._root)<br>
+        try:<br>
+            osutils.rmtree(self._root)<br>
+        except:<br>
+            mutter(&quot;The temporary directory \&quot;%s\&quot; was not cleanly removed.&quot; % self._root)<br>
<br>
^-- You should use here &quot;except OSerror:&quot;<br>
<br>
Also you need to mention the bug you fixing in the NEWS (in the corresponding section).<br>
<br>
Resubmit your patch, please.</blockquote><div><br>Thanks.  That was my plan (OSError).  And I actually did read about updating news in the contributor&#39;s guide but spaced out.  Thanks catching those.  I had a bzr shelve go bad and then bzr check returned an key error.  It&#39;s been a tough couple of hours.  I will resubmit when I&#39;m actually awake. <br>
<br>-M<br><br></div></div>