In the method is defined as

def getUserById(self, id, default=_marker):
        return self.getUser(id)
        if default is _marker: raise
        return default

I am wondering whether anybody actually depends on the fact that getUser is supposed to raise an exception. I know of no user folder implementation that actually does that.

Rather, I'd like to change it to the way it's done in LDAPUserFolder where the method looks (more or less) like:

def getUserById(self, id, default=_marker):
    user = self.getUser(id)
    if user is None and default is not _marker:
        return default
    return user

Any objections?


-- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - )

Reply via email to