From 306c4cb57d6d3a90eff8af062bde446ec75698fc Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Tue, 5 May 2015 15:12:13 +1000 Subject: [PATCH] Fix #180: Avoid deprecated BaseException.message --- websocket/_utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/websocket/_utils.py b/websocket/_utils.py index 3369379..dda1d0c 100644 --- a/websocket/_utils.py +++ b/websocket/_utils.py @@ -85,8 +85,4 @@ def validate_utf8(utfbytes): def extract_err_message(exception): - message = getattr(exception, 'strerror', '') - if not message: - message = getattr(exception, 'message', '') - - return message + return getattr(exception, 'strerror', str(exception))