Commit 01e71ab1 authored by Leonardo Rochael Almeida's avatar Leonardo Rochael Almeida Committed by Julien Muchembled

Fix error when w3c validator can't be found

parent 27c9cd62
......@@ -637,13 +637,14 @@ validator = None
# create the validator object
if validator_to_use == 'w3c':
default = '/usr/share/w3c-markup-validator/cgi-bin:/usr/lib/cgi-bin'
for path in os.environ.get('CGI_PATH', default).split(os.pathsep):
validator_path_list = os.environ.get('CGI_PATH', default).split(os.pathsep)
for path in validator_path_list:
validator_path = os.path.join(path, 'check')
if os.path.exists(validator_path):
validator = W3Validator(validator_path, show_warnings)
break
else:
print 'No w3c validator found at', validator_path
print 'No w3c validator found at', validator_path_list
elif validator_to_use == 'tidy':
error = False
......
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