[MERGE] [BUG 363837] Catch OSError to make diff log debug message instead of passing win32 specific exception to stderr
Martin Pool
mbp at sourcefrog.net
Thu May 14 00:22:30 BST 2009
2009/5/14 Maritza Mendez <martitzam at gmail.com>:
>
> Yes, that is probably wise to include the exception. I will tweak and
> resubmit. I think the process call for me to resubmit, yes?
You can, but it's also easy for someone else to tweak it while
merging, so for you it's optional.
I should also mention that generally we like to have new tests when
new code is added: you could possibly have tested this by adding
something new to test_osutils which makes a directory, makes a file in
it readonly, and then tries to delete the directory. (This is
assuming that rmtree doesn't override the readonly bit, which it may.)
It's useful to add these even for error handling code because it's
easy in Python to for example have a mistake in your string format
which causes the exception handler to crash when it's run. Of course
in some cases it's hard to reach the error handler but still worth
having it there.
For this one it's sufficiently simple I'm ok to merge it without a
test, but if you want to try one it might be interesting.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list