added --write-errors-tolerance and --write-errors-exception-only

This commit is contained in:
roberto@precise64
2012-04-14 09:11:52 +02:00
parent d934270a27
commit b7e6da3392
9 changed files with 57 additions and 5 deletions
+35
View File
@@ -0,0 +1,35 @@
import time
import sys
def application(e, sr):
time.sleep(3)
print("3 seconds elapsed")
sr('200 Ok', [('Content-Type', 'text/html')])
time.sleep(2)
print("2 seconds elapsed")
yield "part1"
try:
time.sleep(2)
except:
print("CLIENT DISCONNECTED !!!")
print("2 seconds elapsed")
yield "part2"
try:
time.sleep(2)
except:
print("CLIENT DISCONNECTED !!!")
print("2 seconds elapsed")
yield "part3"
time.sleep(2)
print("2 seconds elapsed")
yield "part4"
print("end of request")