2
2
===================================================================
6
if os.path.exists(filename):
7
return check(file(filename, 'U').read(), filename)
13
- if os.path.isdir(arg):
14
- for dirpath, dirnames, filenames in os.walk(arg):
15
- for filename in filenames:
16
- if filename.endswith('.py'):
17
- warnings += checkPath(os.path.join(dirpath, filename))
19
- warnings += checkPath(arg)
21
- warnings += check(sys.stdin.read(), '<stdin>')
9
from pyflakes.scripts.pyflakes import main
12
--- a/pyflakes/scripts/pyflakes.py
13
+++ b/pyflakes/scripts/pyflakes.py
15
return check(file(filename, 'U').read() + '\n', filename)
26
+ if os.path.isdir(arg):
27
+ for dirpath, dirnames, filenames in os.walk(arg):
28
+ for filename in filenames:
29
+ if filename.endswith('.py'):
30
+ warnings += checkPath(os.path.join(dirpath, filename))
32
+ warnings += checkPath(arg)
34
+ warnings += check(sys.stdin.read(), '<stdin>')
36
+ raise SystemExit(warnings > 0)
38
-raise SystemExit(warnings > 0)
39
+if __name__ == '__main__':
24
if os.path.isdir(arg):