Warning

This document hasn't been checked for compatibility with current versions of Plone. Use at your own risk.

SyntaxError: 'return' outside function

by Alex Limi last modified Mar 01, 2009 11:44 PM
In a Plone context, you can see this error while running Buildout.

In the particular context of running Buildout, this error is annoying, but harmless.

The reason it happens is that while running buildout, it compiles the Python files — which includes the "Python Script" type from Zope, which isn't a fully-formed Python file. Thus, the compiler thinks there is something wrong.

This error can safely be ignored if it's showing up when running Buildout.