[GTK/MERGE] refactor __init__ to remove duplication.

Robert Collins robertc at robertcollins.net
Tue Apr 10 04:49:27 BST 2007


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
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070410/e16520df/attachment-0001.pgp 


More information about the bazaar mailing list