summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2012-08-29 09:47:19 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2012-08-29 09:47:19 +0200
commitd50dbe1de83727ce7280c3d84e01e091e292a233 (patch)
tree5ad1e005c692dfb9dcd51dc29029becc497b8698
parent1b9339ffd570ece77a2299aee544124d5db855cc (diff)
downloadastroid-d50dbe1de83727ce7280c3d84e01e091e292a233.tar.gz
properly define file_encoding Module attribute. Closes #104041
-rw-r--r--ChangeLog1
-rw-r--r--scoped_nodes.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e025622..1f40048 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@ Change log for the astng package
--
* #92362: fix pyreverse crash on relative import
+ * #104041: fix crash 'module object has no file_encoding attribute'
2012-07-18 -- 0.24.0
* include pylint brain extension, describing some stuff not properly understood until then.
diff --git a/scoped_nodes.py b/scoped_nodes.py
index 1a1242c..4be1a97 100644
--- a/scoped_nodes.py
+++ b/scoped_nodes.py
@@ -220,6 +220,9 @@ class Module(LocalsDictNodeNG):
# the file from which as been extracted the astng representation. It may
# be None if the representation has been built from a built-in module
file = None
+ # encoding of python source file, so we can get unicode out of it (python2
+ # only)
+ file_encoding = None
# the module name
name = None
# boolean for astng built from source (i.e. ast)