I removed all catch-all except clauses (e.g. those that doesn't specify a base class like except:) and replaced them with either a base class that doesn't catch exceptions like KeyboardInterrupt which should never be caught by an application, or other constructions such as dict.get and proper equality check w.r.t None.
I removed all catch-all except clauses (e.g. those that doesn't specify a base class like
except:
) and replaced them with either a base class that doesn't catch exceptions likeKeyboardInterrupt
which should never be caught by an application, or other constructions such asdict.get
and proper equality check w.r.tNone
.