Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/astparser.py
diff options
context:
space:
mode:
authorReinier Heeres <reinier@heeres.eu>2009-04-06 22:21:48 (GMT)
committer Reinier Heeres <reinier@heeres.eu>2009-04-06 22:21:48 (GMT)
commitda830cf757964c1a8c8c725c187ce3bdae764b18 (patch)
treef0112a28fa5261e28b3de3deb3d42cbb9f6c0f00 /astparser.py
parentd108108718f1895d449b0dbdb85d542d8f8e5a81 (diff)
Make toolbar '=' insert '==' as it should
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):