*** publish.py.orig Tue Jul 1 21:54:37 2003 --- publish.py Fri Aug 22 18:22:28 2003 *************** *** 541,547 **** # Output results from Response object if output: ! request.response.set_body(str(output)) try: request.response.write(stdout) except IOError, exc: --- 541,561 ---- # Output results from Response object if output: ! if hasattr(output, "more"): # output is a producer ! data = [] ! while True: ! s = output.more() ! if s: ! data.append(s) ! else: ! break ! output = ''.join(data) ! elif hasattr(output, "next"): # output is an iterator/generator ! output = ''.join([str(s) for s in output]) ! else: ! output = str(output) ! if output: ! request.response.set_body(output) try: request.response.write(stdout) except IOError, exc: