← Back to team overview

divmod-dev team mailing list archive

[Bug 848455] Re: Detect misuse of except

 

** Changed in: pyflakes (Debian)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Divmod-
dev, which is the registrant for Pyflakes.
https://bugs.launchpad.net/bugs/848455

Title:
  Detect misuse of except

Status in Pyflakes:
  New
Status in “pyflakes” package in Debian:
  Confirmed

Bug description:
  It would be nice if pyflakes could detect mistakes like this:

         try:
             oldtime = os.path.getmtime(fname)
         except OSError, IOError:
             oldtime = 0

  In the general case, it's obviously difficult to tell whether this is
  an error or not; but I suspect that handling the exception variable
  name as a binding would give you a "redefinition of Foo" warning in
  most of the cases where a mistake has been made.

To manage notifications about this bug go to:
https://bugs.launchpad.net/pyflakes/+bug/848455/+subscriptions


References