<br><br><div class="gmail_quote">On Tue, May 12, 2009 at 12:25 AM, Alexander Belchenko <span dir="ltr"><<a href="mailto:bialix@ukr.net">bialix@ukr.net</a>></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'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("The temporary directory \"%s\" was not cleanly removed." % self._root)<br>
<br>
^-- You should use here "except OSerror:"<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's guide but spaced out. Thanks catching those. I had a bzr shelve go bad and then bzr check returned an key error. It's been a tough couple of hours. I will resubmit when I'm actually awake. <br>
<br>-M<br><br></div></div>