Skip to content

Instantly share code, notes, and snippets.

@lvh
Created August 5, 2012 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lvh/3263629 to your computer and use it in GitHub Desktop.
Save lvh/3263629 to your computer and use it in GitHub Desktop.
from twisted.protocols import amp
class NestedAMPBox(amp.AmpList):
def fromStringProto(self, inString, proto):
value, = amp.AmpList.fromStringProto(self, inString, proto)
return value
def toStringProto(self, inObject, proto):
return amp.AmpList.toStringProto(self, [inObject], proto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment