restricted
Module¶
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Restricted environment to execute application’s code¶
-
exception
gluon.restricted.
RestrictedError
(layer='', code='', output='', environment=None)[source]¶ Bases:
exceptions.Exception
Class used to wrap an exception that occurs in the restricted environment below. The traceback is used to log the exception and generate a ticket.
-
gluon.restricted.
restricted
(code, environment=None, layer='Unknown')[source]¶ Runs code in environment and returns the output. If an exception occurs in code it raises a RestrictedError containing the traceback. Layer is passed to RestrictedError to identify where the error occurred.
-
class
gluon.restricted.
TicketStorage
(db=None, tablename='web2py_ticket')[source]¶ Bases:
gluon.storage.Storage
Defines the ticket object and the default values of its members (None)