socket.error.__bases__ = (EnvironmentError,) ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • robert

    socket.error.__bases__ = (EnvironmentError,) ?

    I've often trouble catching IO errors in general. Now a frequent case everywhere in an app after I've added a defaultsocketti mout.
    Is this a legal/right practice to change the Exception tree like this:

    socket.error.__ bases__ = (EnvironmentErr or,)

    And is there a chance that in future there is a common base exception class (EnvironmentErr or or an new super class) for these kind of exceptions (socket, httplib, ftplib, ...)


    -robert
Working...