Commit 0edc17f4 authored by Denis Bilenko's avatar Denis Bilenko

util/pyflakes.py: do not ignore errors, py3&py2.6

- do not swallow syntax errors
- make pyflakes.py py3-compatible #38
- run using specific version of python (previously pyflakes from the default python
  was used, which caused it to ignore py3-specific and py2.6-specific syntax errors
parent 72ada7d2
......@@ -30,12 +30,22 @@ def is_ignored(line):
return True
popen = subprocess.Popen('pyflakes gevent/ examples/ greentest/*.py util/ *.py', shell=True, stdout=subprocess.PIPE)
output, _err = popen.communicate()
popen = subprocess.Popen('%s `which pyflakes` gevent/ examples/ greentest/*.py util/ *.py' % sys.executable,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
output, errors = popen.communicate()
if errors:
sys.stderr.write(errors.decode())
if popen.poll() != 1:
sys.stderr.write(output + '\n')
sys.exit('pyflakes returned %r' % popen.poll())
if errors:
sys.exit(1)
assert output
output = output.strip().split('\n')
......
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