Permalink
Browse files

use TM_PYFLAKES to point to your own custom version of pyflakes

  • Loading branch information...
1 parent 7b5007c commit cd15fc247a5806f9b1f21881b691e05442a0f8ce @tomster committed Sep 12, 2009
Showing with 5 additions and 2 deletions.
  1. +5 −2 Commands/Validate Syntax (pyflakes).tmCommand
@@ -9,7 +9,8 @@
import os
import subprocess
tm_file = os.environ['TM_FILEPATH']
-pyflakes_cmd = '%s %s' % ('pyflakes', tm_file)
+pyflakes = os.environ.get('TM_PYFLAKES', 'pyflakes')
+pyflakes_cmd = '%s %s' % (pyflakes, tm_file)
out = subprocess.Popen(pyflakes_cmd,
shell=True,
stdout=subprocess.PIPE,
@@ -21,7 +22,9 @@ if not out[1].find('command not found') > 0:
out = ''.join(out[1])
out = out.replace('%s:' % tm_file, '')
else:
- out = "Warning: No pyflakes found!"
+ out = """Warning: No pyflakes found!
+You can set the TM_PYFLAKES environment variable to point to it.
+"""
print out
</string>

0 comments on commit cd15fc2

Please sign in to comment.