rb: Make TServer.py Python 2.4 compatible [THRIFT-44]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671337 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/py/src/server/TServer.py b/lib/py/src/server/TServer.py
index b656b49..d573995 100644
--- a/lib/py/src/server/TServer.py
+++ b/lib/py/src/server/TServer.py
@@ -224,13 +224,14 @@
ecode = 0
try:
- while True:
- self.processor.process(iprot, oprot)
- except TTransport.TTransportException, tx:
- pass
- except Exception, e:
- logging.exception(e)
- ecode = 1
+ try:
+ while True:
+ self.processor.process(iprot, oprot)
+ except TTransport.TTransportException, tx:
+ pass
+ except Exception, e:
+ logging.exception(e)
+ ecode = 1
finally:
try_close(itrans)
try_close(otrans)