Package: pyflakes
Version: 0.5.0-1
Severity: minor

If the tested file contains null bytes, pyflakes fails with traceback:

$ pyflakes test.py
Traceback (most recent call last):
  File "/usr/bin/pyflakes", line 5, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/lib/pymodules/python2.7/pyflakes/scripts/pyflakes.py", line 92, in 
main
    warnings += checkPath(arg)
  File "/usr/lib/pymodules/python2.7/pyflakes/scripts/pyflakes.py", line 74, in 
checkPath
    return check(fd.read(), filename)
  File "/usr/lib/pymodules/python2.7/pyflakes/scripts/pyflakes.py", line 28, in 
check
    tree = compile(codeString, filename, "exec", _ast.PyCF_ONLY_AST)
TypeError: compile() expected string without null bytes


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 3.3.0-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pyflakes depends on:
ii  python          2.7.2-10
ii  python-support  1.0.14

--
Jakub Wilk

Attachment: test.py.gz
Description: Binary data

Reply via email to