1. Georg Brandl
  2. sphinx
  3. Pull requests

Pull requests

#271 Declined
Repository
r_rudi
Branch
default
Repository
birkenfeld
Branch
default

narrow to AttributeError instead of except Exception.

Author
  1. Shirou wakayama
Reviewers
Description
except Exception:
    pass

is too wide to catch Exception. According to the comment, an AttributeError might be raised. I think it should except only that.

Comments (3)

  1. Georg Brandl repo owner

    Is there an actual problem caused by an exception masked by this? If not, please keep it this way; user-supplied classes have a habit of raising strange exceptions for basic operations (similar to autodoc). Mostly this comes from descriptors that don't work on non-instantiated classes.

  2. Shirou wakayama author

    I noticed it when adding to encoding. I am agree to catch an Exception for the user-supplied classes. But how about to print a warning(or info) when exception occurred?