def render_POST(self, request):
        try:
            username = request.args['username'][0]
        except KeyError, IndexError:
            username = '<not supplied>'
        try:
            password = request.args['password'][0]
        except __HOLE__, IndexError:
            password = '<not supplied>'
        useragent = request.getHeader('user-agent')
        if not useragent:
            useragent = '<not supplied>'

        logdata = {
            'USERNAME': username,
            'PASSWORD': password,
            'SKIN': self.skin,
            'HOSTNAME': request.getRequestHostname(),
            'PATH': request.path,
            'USERAGENT': useragent
        }
        logtype = self.factory.logger.LOG_HTTP_POST_LOGIN_ATTEMPT
        self.factory.log(logdata, transport=request.transport, logtype=logtype)

        return self.err
dataset/ETHPy150Open thinkst/opencanary/opencanary/modules/http.py/BasicLogin.render_POST