Permalink
Browse files

make ServerBase not complain on custom output strings.

  • Loading branch information...
1 parent 9ea9c99 commit 50109c1f5ef5d953b2d30f70aef411d0a1a9d8cc @plq plq committed Nov 17, 2012
Showing with 5 additions and 3 deletions.
  1. +1 −0 spyne/application.py
  2. +4 −3 spyne/server/_base.py
@@ -42,6 +42,7 @@ def _get_fault_string_from_exception(e):
return traceback.format_exc()
get_fault_string_from_exception = _get_fault_string_from_exception
+
class Application(object):
'''The Application class is the glue between one or more service
definitions, input and output protocols.
@@ -102,10 +102,11 @@ def get_out_string(self, ctx):
"""Uses the ctx.out_object to set ctx.out_document and later
ctx.out_object."""
- assert ctx.out_document is None
- assert ctx.out_string is None
+ if ctx.out_string is not None:
+ return
- self.app.out_protocol.serialize(ctx,
+ if ctx.out_document is None:
+ self.app.out_protocol.serialize(ctx,
message=self.app.out_protocol.RESPONSE)
if ctx.service_class != None:

0 comments on commit 50109c1

Please sign in to comment.