summaryrefslogtreecommitdiff
path: root/astroid/scoped_nodes.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-24 11:19:35 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-05-01 22:00:19 +0200
commit4cbb50f5b58c83524fa87ff9fd9225db89ced58e (patch)
tree3fee040981de58964d429b1e28ee308d6561b2ec /astroid/scoped_nodes.py
parent75eb8347ac8f64c45311b41a126370b46300f539 (diff)
downloadastroid-git-4cbb50f5b58c83524fa87ff9fd9225db89ced58e.tar.gz
Fix BaseException.message has been deprecated as of Python 2.6
And removed in python 3.
Diffstat (limited to 'astroid/scoped_nodes.py')
-rw-r--r--astroid/scoped_nodes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py
index a63741bf..d7717e64 100644
--- a/astroid/scoped_nodes.py
+++ b/astroid/scoped_nodes.py
@@ -611,7 +611,7 @@ class Module(LocalsDictNodeNG):
return bases._infer_stmts(self.getattr(name, context), context, frame=self)
except exceptions.AttributeInferenceError as error:
raise exceptions.InferenceError(
- error.message, target=self, attribute=name, context=context
+ str(error), target=self, attribute=name, context=context
) from error
def fully_defined(self):
@@ -1617,7 +1617,7 @@ class FunctionDef(mixins.MultiLineBlockMixin, node_classes.Statement, Lambda):
return bases._infer_stmts(self.getattr(name, context), context, frame=self)
except exceptions.AttributeInferenceError as error:
raise exceptions.InferenceError(
- error.message, target=self, attribute=name, context=context
+ str(error), target=self, attribute=name, context=context
) from error
def is_method(self):
@@ -2605,7 +2605,7 @@ class ClassDef(mixins.FilterStmtsMixin, LocalsDictNodeNG, node_classes.Statement
yield util.Uninferable
else:
raise exceptions.InferenceError(
- error.message, target=self, attribute=name, context=context
+ str(error), target=self, attribute=name, context=context
) from error
def has_dynamic_getattr(self, context=None):