Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/astparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'astparser.py')
-rw-r--r--astparser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/astparser.py b/astparser.py
index 3a87817..bf6d37a 100644
--- a/astparser.py
+++ b/astparser.py
@@ -368,12 +368,12 @@ class AstParser:
# Copy state, list objects will remain the same
state = copy.copy(state)
state.level += 1
- ofs = node.col_offset
+ ofs = getattr(node, 'col_offset', 0)
if node is None:
return None
- elif isinstance(node, ast.Expression):
+ elif isinstance(node, ast.Expression) or isinstance(node, ast.Module):
return self._process_node(node.body, state)
elif isinstance(node, ast.BinOp):