Package: pyflakes Version: 0.2.1-2 Severity: normal Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi, compiling some files raises a Unicode error. The patch catches the error and prints a useful error message instead of raising an exception and terminating. Also attached is a sample file that reproduces the error. Regards, Bastian - -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.22-ck1treasure3 (PREEMPT) Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash Versions of packages pyflakes depends on: ii python 2.4.4-6 An interactive high-level object-o ii python-central 0.5.15 register and build utility for Pyt pyflakes recommends no packages. - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG3LdXeBwlBDLsbz4RAlgRAKDJKWPH2u6J1ORDo9jxoi5ArqmoVwCcCW3s kbZjrCtk7Hmmwte07JQNHwA= =Qwq3 -----END PGP SIGNATURE-----
--- /usr/bin/pyflakes.orig 2007-09-04 03:07:40.000000000 +0200 +++ /usr/bin/pyflakes 2007-09-04 03:09:43.000000000 +0200 @@ -16,6 +16,8 @@ print >> sys.stderr, 'could not compile %r:%d:' % (filename, lineno) print >> sys.stderr, line print >> sys.stderr, " " * (offset-2), "^" + except UnicodeError, msg: + print >> sys.stderr, 'encoding error at %r: %s' % (filename, msg) else: w = pyflakes.Checker(tree, filename) w.messages.sort(lambda a, b: cmp(a.lineno, b.lineno))
#!/usr/bin/python2.4 # -*- coding: iso-8859-1 -*- s = u"a" \ "รถ"