Code review comment for lp:~pitti/ubuntuone-control-panel/gi-fixes

Revision history for this message
dobey (dobey) wrote :

12 +if 'gobject' in sys.modules:
13 + import gobject as GObject
14 +else:
15 + from gi.repository import GObject

I'm pretty sure this if statement will always fail, even if the GI version isn't available, as sys.modules doesn't list what is available, but rather what is actively loaded in the current python process? Or at least, looking at sys.modules in python shell without loading anything else, doesn't seem to give particularly useful results for performing this sort of check.

And it's not clear to me why the GLib.format_size_for_display() was removed. I suppose because you didn't convert it to use Gtk from gi.repository?

review: Needs Fixing

« Back to merge proposal