Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix scope error in generated definition of QueryTextExtents.

  • Loading branch information...
commit aa0fc947a6533bd0b61602ab27304e974eef3dd9 1 parent 14a3354
@cortesi cortesi authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/py_client.py
View
6 src/py_client.py
@@ -257,7 +257,11 @@ def _py_get_length_field(expr):
Otherwise, just reference the structure field directly.
'''
if expr.lenfield_name != None:
- return 'self.%s' % expr.lenfield_name
+ # This would be nicer if Request had an is_request attribute...
+ if hasattr(expr.parent.parent, "opcode"):
+ return expr.lenfield_name
+ else:
+ return 'self.%s' % expr.lenfield_name
else:
return str(expr.nmemb)
Please sign in to comment.
Something went wrong with that request. Please try again.