[Xcb] [PATCH 2/2] Expression may only have 'parents' attribute rather than 'parent'.
Arnaud Fontaine
arnaud at andesi.org
Wed Jan 25 00:07:42 PST 2012
From: Arnaud Fontaine <arnau at debian.org>
---
src/py_client.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/py_client.py b/src/py_client.py
index ac8099b..68fb254 100755
--- a/src/py_client.py
+++ b/src/py_client.py
@@ -261,7 +261,7 @@ def _py_get_length_field(expr):
'''
if expr.lenfield_name != None:
# This would be nicer if Request had an is_request attribute...
- if hasattr(expr.parent.parent, "opcode"):
+ if hasattr(expr.parent, 'parent') and hasattr(expr.parent.parent, "opcode"):
return expr.lenfield_name
else:
return 'self.%s' % expr.lenfield_name
--
1.7.8.3
More information about the Xcb
mailing list