Removed psyco from list of allowed imports - it's not safe after all.

Try/Except clauses are now allowed.
This commit is contained in:
Greg Copeland 2008-06-19 22:08:27 +00:00
parent 6b4e207e37
commit 312cd8eb02
2 changed files with 4 additions and 2 deletions

View File

@ -47,11 +47,12 @@ Version 1.5.0+svn:
* Implemented a function which detects if a location is on the map border.
* Implemented a function which gives the game's gold parameters.
* Extended safe.py environment to expand AI's language capabilities; including:
collections, hotshot, psyco, Queue, sets, time, and the upcoming wail module
collections, hotshot, Queue, sets, time, and the upcoming wail module.
Use of chr, hash, lambda, ord, and super (new style classes) are now allowed
Control of safe_exec can now be toggled from the wesnoth binary (not implemented)
* Added new advanced option, "Only Run Safe Python AIs". When disabled, the safe_exec
environment is disabled for all running AIs. Use caution when disabling this option!
* Try/Except clauses are now allowed.
* terrains:
* Fixed city village not being alias of the village terrain type; this was
causing a duplicate "Village" terrain being displayed in the defense ratios

View File

@ -37,7 +37,8 @@ _NODE_CLASS_OK = [
'LeftShift', 'List', 'ListComp', 'ListCompFor', 'ListCompIf', 'Mod',
'Module', 'Mul', 'Name', 'Node', 'Not', 'Or', 'Pass', 'Power',
'Print', 'Printnl', 'Return', 'RightShift', 'Slice', 'Sliceobj',
'Stmt', 'Sub', 'Subscript', 'Tuple', 'UnaryAdd', 'UnarySub', 'While',
'Stmt', 'Sub', 'Subscript', 'TryExcept', 'Tuple', 'UnaryAdd',
'UnarySub', 'While',
]
_NODE_ATTR_OK = []
_STR_OK = ['__init__']