Bug#688474: idjc: except shadows builtin
Sebastian Ramacher
sebastian at ramacher.at
Sat Sep 22 23:07:15 UTC 2012
Package: idjc
Version: 0.8.7-2
Severity: normal
Tags: patch upstream
Usertags: l4py-except-shadows-builtin
lintian4py reports the followin issues:
e: idjc: except-shadows-builtin usr/share/pyshared/idjc/freefunctions.py:55: TypeError
e: idjc: except-shadows-builtin usr/share/pyshared/idjc/maingui.py:2204: IOError
From the tag's description:
N: One error that Python programmers occasionally make is writing the
N: following code:
N:
N: try:
N: ...
N: except TypeError, ValueError: # Wrong!
N: ...
N:
N: The author is probably trying to catch both TypeError and ValueError
N: exceptions, but this code actually does something different: it will
N: catch TypeError and bind the resulting exception object to the local
N: name ValueError. The ValueError exception will not be caught at all.
N: The correct code specifies a tuple of exceptions:
N:
N: try:
N: ...
N: except (TypeError, ValueError):
N: ...
N:
N: Refer to
N: http://docs.python.org/whatsnew/2.6.html#pep-3110-exception-handling-c
N: hanges for details.
Please find attached a patch to fix this issue.
Regards
--
Sebastian Ramacher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idjc-except-shadows-builtin.patch
Type: text/x-diff
Size: 768 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20120923/e4963b07/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20120923/e4963b07/attachment.pgp>
More information about the pkg-multimedia-maintainers
mailing list