diff --git a/product/ERP5Type/mixin/component.py b/product/ERP5Type/mixin/component.py index 0de1d04304bdbf97a70bcb0182e3d479e47e67da..e51f58e25e256a82ab3ffe4d28efb0aeaca62f7e 100644 --- a/product/ERP5Type/mixin/component.py +++ b/product/ERP5Type/mixin/component.py @@ -293,7 +293,11 @@ class ComponentMixin(PropertyRecordableMixin, Base): from pylint.lint import Run from pylint.reporters.text import TextReporter except ImportError, error: - return ['F: Cannot check Source Code: Pylint is not available (%s)' % error], [] + try: + compile(source_code, '<string>', 'exec') + return [], [] + except BaseException, error: + return ['F: %s' % error], [] import cStringIO import tempfile