Skip to content

Commit

Permalink
cleanup flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
loechel committed May 5, 2017
1 parent bd4ef3e commit dd46999
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Products/PythonScripts/PythonScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,13 @@ def _exec(self, bound_names, args, kw):
safe_globals.update(bound_names)
safe_globals['__traceback_supplement__'] = (
PythonScriptTracebackSupplement, self, -1)
safe_globals['__file__'] = getattr(self, '_filepath', None) or self.get_filepath()
function = types.FunctionType(function_code, safe_globals, None, function_argument_definitions)
safe_globals['__file__'] = getattr(self, '_filepath', None) or \
self.get_filepath()
function = types.FunctionType(function_code,
safe_globals,
None,
function_argument_definitions
)

try:
result = function(*args, **kw)
Expand Down

0 comments on commit dd46999

Please sign in to comment.