From 8586ac15f5fce6cd04699c0848608f778b2f4574 Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Thu, 6 Dec 2012 00:00:00 +0000 Subject: [PATCH] BaseException.message is deprecated in Python 2.6 and gone in 3 --- elftools/common/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elftools/common/utils.py b/elftools/common/utils.py index e6fc6b6..a2c9edb 100644 --- a/elftools/common/utils.py +++ b/elftools/common/utils.py @@ -31,7 +31,7 @@ def struct_parse(struct, stream, stream_pos=None): stream.seek(stream_pos) return struct.parse_stream(stream) except ConstructError as e: - raise ELFParseError(e.message) + raise ELFParseError(str(e)) def parse_cstring_from_stream(stream, stream_pos=None): -- 2.30.2