From: Martin Panter Date: Thu, 6 Dec 2012 00:00:00 +0000 (+0000) Subject: BaseException.message is deprecated in Python 2.6 and gone in 3 X-Git-Tag: v0.23~10^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8586ac15f5fce6cd04699c0848608f778b2f4574;p=pyelftools.git BaseException.message is deprecated in Python 2.6 and gone in 3 --- 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):