def requestAvatarId(self, c):
        try:
            u, p = self.getUser(c.username)
        except __HOLE__:
            return defer.fail(error.UnauthorizedLogin())
        else:
            up = credentials.IUsernamePassword(c, None)
            if self.hash:
                if up is not None:
                    h = self.hash(up.username, up.password, p)
                    if h == p:
                        return defer.succeed(u)
                return defer.fail(error.UnauthorizedLogin())
            else:
                return defer.maybeDeferred(c.checkPassword, p
                    ).addCallback(self._cbPasswordMatch, u)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/cred/checkers.py/FilePasswordDB.requestAvatarId