Exemplo n.º 1
0
                HTTP(500, rewrite.thread.routes.error_message_ticket \
                         % dict(ticket=ticket),
                     web2py_error='ticket %s' % ticket)

    finally:
        if response and hasattr(response, 'session_file') \
                and response.session_file:
            response.session_file.close()

    session._unlock(response)
    http_response, new_environ = rewrite.try_rewrite_on_error(
        http_response, request, environ, ticket)
    if not http_response:
        return wsgibase(new_environ,responder)
    if global_settings.web2py_crontype == 'soft':
        newcron.softcron(global_settings.applications_parent).start()
    return http_response.to(responder)


def save_password(password, port):
    """
    used by main() to save the password in the parameters_port.py file.
    """

    password_file = abspath('parameters_%i.py' % port)
    if password == '<random>':
        # make up a new password
        chars = string.letters + string.digits
        password = ''.join([random.choice(chars) for i in range(8)])
        cpassword = CRYPT()(password)[0]
        print '******************* IMPORTANT!!! ************************'
Exemplo n.º 2
0
            if response._custom_rollback:
                response._custom_rollback()
            else:
                BaseAdapter.close_all_instances(BaseAdapter.rollback)
        except:
            pass
        e = RestrictedError('Framework', '', '', locals())
        ticket = e.log(request) or 'unrecoverable'
        http_response = \
            HTTP(500,
                 rewrite.params.error_message_ticket % dict(ticket=ticket),
                 web2py_error='ticket %s' % ticket)
    session._unlock(response)
    http_response = rewrite.try_redirect_on_error(http_response,request,ticket)
    if settings.web2py_crontype == 'soft':
        newcron.softcron(web2py_path).start()
    return http_response.to(responder)


def save_password(password, port):
    """
    used by main() to save the password in the parameters.py file.
    """

    password_file='parameters_%i.py' % port
    if password == '<random>':
        # make up a new password
        chars = string.letters + string.digits
        password = ''.join([random.choice(chars) for i in range(8)])
        cpassword = CRYPT()(password)[0]
        print '******************* INPORTANT!!! ************************'
Exemplo n.º 3
0
                HTTP(500, rwthread.routes.error_message_ticket
                     % dict(ticket=ticket),
                     web2py_error='ticket %s' % ticket)

    finally:
        if response and hasattr(response, 'session_file') \
                and response.session_file:
            response.session_file.close()

    session._unlock(response)
    http_response, new_environ = try_rewrite_on_error(http_response, request,
                                                      environ, ticket)
    if not http_response:
        return wsgibase(new_environ, responder)
    if global_settings.web2py_crontype == 'soft':
        newcron.softcron(global_settings.applications_parent).start()
    return http_response.to(responder, env=env)


def save_password(password, port):
    """
    used by main() to save the password in the parameters_port.py file.
    """

    password_file = abspath('parameters_%i.py' % port)
    if password == '<random>':
        # make up a new password
        chars = string.letters + string.digits
        password = ''.join([random.choice(chars) for i in range(8)])
        cpassword = CRYPT()(password)[0]
        print '******************* IMPORTANT!!! ************************'
Exemplo n.º 4
0
            ticket = e.log(request) or 'unrecoverable'
            http_response = \
                HTTP(500,
                     rewrite.thread.routes.error_message_ticket % dict(ticket=ticket),
                     web2py_error='ticket %s' % ticket)

    finally:
        if response and hasattr(response,
                                'session_file') and response.session_file:
            response.session_file.close()

    session._unlock(response)
    http_response = rewrite.try_redirect_on_error(http_response, request,
                                                  ticket)
    if settings.web2py_crontype == 'soft':
        newcron.softcron(web2py_path).start()
    return http_response.to(responder)


def save_password(password, port):
    """
    used by main() to save the password in the parameters.py file.
    """

    password_file = 'parameters_%i.py' % port
    if password == '<random>':
        # make up a new password
        chars = string.letters + string.digits
        password = ''.join([random.choice(chars) for i in range(8)])
        cpassword = CRYPT()(password)[0]
        print '******************* INPORTANT!!! ************************'