Code review comment for lp:~jcsackett/launchpad/unknown-blueprints-service-597738

Revision history for this message
Curtis Hovey (sinzui) wrote :

On Fri, 2010-09-10 at 15:59 +0000, Brad Crittenden wrote:
> > + @property
> > + def template(self):
> > + # If the template has been defined in the zcml, use that,
> as this
> > + # isn't the base service page for blueprints.
> > + if hasattr(self, 'index'):
>
> As we discussed on IRC, you should use 'safe_hasattr' from
> canonical.lazr.utils. Also, as I suggested please check around and
> see if there is a more obvious technique for this. Sadly I cannot
> offer any other solution.

We can abandon safe_hasattr when lpnet is on lucid. This issue was fixed
several years ago in pythong 2.6

« Back to merge proposal