Commit 7b97d123 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Do not prevent Zope from starting if pylint is not available.

Only prevent ZODB Components to be validated as the source code cannot be
checked. This does not prevent BT to be upgraded, so this should be ok.
parent 4eae475d
......@@ -43,12 +43,6 @@ from zLOG import LOG, INFO
from ExtensionClass import ExtensionClass
from Products.ERP5Type.Utils import convertToUpperCase
# Pylint imports
from pylint.lint import Run
from pylint.reporters.text import TextReporter
import cStringIO
import tempfile
import sys
import re
pylint_message_re = re.compile('^(?P<type>[CRWEF]):\s*\d+,\s*\d+:\s*.*$')
......@@ -304,6 +298,16 @@ class ComponentMixin(PropertyRecordableMixin, Base):
if not source_code:
return [], []
try:
from pylint.lint import Run
from pylint.reporters.text import TextReporter
except ImportError:
return ['F: Cannot check Source Code: Pylint is not available'], []
import cStringIO
import tempfile
import sys
#import time
#started = time.time()
error_list = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment