Code review comment for lp:~pitti/gtimelog/pygi

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, if we get an AttributeError after the "Gtk" repository is already imported, we can't import pygtk afterwards, so due to that we actually have to test for pygtk first. That will cause pygtk to be preferred, and the GI code to get much less exposure, but we can still locally patch that in Ubuntu, so it's not a biggie.

I added the bare "except:" on the indicator because ImportError is not the only probable exception here. gi.RepositoryError also can happen if the installed AppIndicator gir wasn't built against the version of GTK that gtimelog uses. There might be other causes I haven't thought about as well, but I guess those two are the main ones, so I tightened up the except statement.

I addressed the other things as well.

review: Needs Resubmitting

« Back to merge proposal