[GTK/MERGE] refactor __init__ to remove duplication.

John Arbash Meinel john at arbash-meinel.com
Tue Apr 10 04:54:04 BST 2007


Robert Collins wrote:
> On Sun, 2007-04-08 at 08:23 -0500, John Arbash Meinel wrote:
>>
>> ^- Don't you need to re-raise the RuntimeError if it is something
>> else?
>>
>> try:
>>   import gtk
>> except RuntimeError, e:
>>   if str(e) == "could not open display":
>>     raise NoDisplayError
>>   raise
>> ...
>>
>> And it would seem reasonable to do "str(e).lower()" in case they
>> change
>> the formatting. But that isn't a big deal. 
> 
> Both these things sound good to do :). I was just rearranging what was
> there though ;).
> 
> -Rob

Well, if you put code up for review... Expect it to get reviewed :)

I understand you were just refactoring, but often that shows up what
should have been done in the first place.

John
=:->




More information about the bazaar mailing list