On Mon, Dec 21, 2009 at 05:52:10PM +0100, Muharem Hrnjadovic wrote:
> Kees Cook wrote:
> > On Mon, Dec 21, 2009 at 04:18:23PM +0100, Muharem Hrnjadovic wrote:
> >> Quick info: the branch with the changes announced below just landed on
> >> db-devel (revno: 8815)
> > 
> > Thanks for the heads-up!  Just for reference, I think this is a portable
> > way to handle either interface to the API:
> > 
> >     import types
> >     if type(item.changes_file_url) == types.MethodType:
> >         src_changes = item.changes_file_url()
> Hello Kees,
> 
> cool idea, please note that the method name is changesFileUrl().

Oh!  Heh, well, that actually makes it easier:

    if hasattr(item,'changes_file_url'):
        src_changes = item.changes_file_url
    else:
        src_changes = item.changesFileUrl()

Thanks,

-Kees

-- 
Kees Cook
Ubuntu Security Team

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to