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

Revision history for this message
Barry Warsaw (barry) wrote :

Minor comments about the code:

the 'pygtk = True' in the ImportError clause looks odd because you're clobbering the name binding given by the 'import pygtk'. It would probably read easier if you changed that to 'has_pygtk = True'.

OTOH, the way it's often done in other places is to set 'pygtk = None' in the try: clause. You're 'if pygtk' tests will still work that way because the import statement will bind pygtk to the module object, which is not false.

Can you tighten up the bare except on line 130? If not, *please* add a comment explaining why the bare except is necessary.

Other than that, it's encouraging that it wasn't really that much code to add support for the three different regimes. Very nice!

« Back to merge proposal