Skip to content

Commit

Permalink
correct params for compile_restricted_function according to old API
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed Feb 7, 2017
1 parent f93693c commit 7736ab1
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/RestrictedPython/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ def compile_restricted_single(


def compile_restricted_function(
source,
p,
body,
name,
filename='<string>',
flags=0,
dont_inherit=0,
globalize=None,
policy=RestrictingNodeTransformer):
"""Compile a restricted code object for a function.
Expand All @@ -121,17 +122,16 @@ def compile_restricted_function(
The globalize argument, if specified, is a list of variable names to be
treated as globals (code is generated as if each name in the list
appeared in a global statement at the top of the function).
TODO: Special function not comparable with the other restricted_compile_*
functions.
"""
return _compile_restricted_mode(
source,
filename=filename,
mode='function',
flags=flags,
dont_inherit=dont_inherit,
policy=policy)
# TODO: Special function not comparable with the other restricted_compile_* functions. # NOQA
return None
# return _compile_restricted_mode(
# source,
# filename=filename,
# mode='function',
# flags=flags,
# dont_inherit=dont_inherit,
# policy=policy)


def compile_restricted(
Expand Down

0 comments on commit 7736ab1

Please sign in to comment.