[Twisted-Python] Getting error code

Hi, Is there a way to extract the error code from a Failure instance? For example when clientConnectionFailed is called the 'value' field of the Failure instance is 'Connection was refused by other side: 10061: Unknown error.'. Can I get 10061 somehow as I don't feel safe parsing this string. Thanks, Sorin __________________________________ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861

On Thu, 2004-05-13 at 14:18, Sorin C. wrote:
value.errno should do it. A better idea would be to go by exception type, e.g. in this case you should be getting a twisted.internet.error.ConnectionRefusedError or something instance as the value object. -- Itamar Shtull-Trauring http://itamarst.org

--- Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
Thanks, by type indeed is better. Sorin __________________________________ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861

On Thu, 2004-05-13 at 14:18, Sorin C. wrote:
value.errno should do it. A better idea would be to go by exception type, e.g. in this case you should be getting a twisted.internet.error.ConnectionRefusedError or something instance as the value object. -- Itamar Shtull-Trauring http://itamarst.org

--- Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
Thanks, by type indeed is better. Sorin __________________________________ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861
participants (2)
-
Itamar Shtull-Trauring
-
Sorin C.