THRIFT-1773. Revert "Thrift-1604:Python exxception handeling for changes from PEP3110"
This reverts commit 6c5ee6ad2067e245ab5364f9a6019d8b63d7ed52.
This commit is being reverted since it broke compatibility with
Python 2.4, which is the latest version included in RHEL5 releases.
diff --git a/lib/py/src/server/TServer.py b/lib/py/src/server/TServer.py
index 97097cc..2f24842 100644
--- a/lib/py/src/server/TServer.py
+++ b/lib/py/src/server/TServer.py
@@ -84,7 +84,7 @@
self.processor.process(iprot, oprot)
except TTransport.TTransportException, tx:
pass
- except Exception as x:
+ except Exception, x:
logging.exception(x)
itrans.close()
@@ -108,7 +108,7 @@
t.start()
except KeyboardInterrupt:
raise
- except Exception as x:
+ except Exception, x:
logging.exception(x)
def handle(self, client):
@@ -121,7 +121,7 @@
self.processor.process(iprot, oprot)
except TTransport.TTransportException, tx:
pass
- except Exception as x:
+ except Exception, x:
logging.exception(x)
itrans.close()
@@ -161,7 +161,7 @@
self.processor.process(iprot, oprot)
except TTransport.TTransportException, tx:
pass
- except Exception as x:
+ except Exception, x:
logging.exception(x)
itrans.close()
@@ -174,7 +174,7 @@
t = threading.Thread(target=self.serveThread)
t.setDaemon(self.daemon)
t.start()
- except Exception as x:
+ except Exception, x:
logging.exception(x)
# Pump the socket for clients
@@ -183,7 +183,7 @@
try:
client = self.serverTransport.accept()
self.clients.put(client)
- except Exception as x:
+ except Exception, x:
logging.exception(x)
@@ -208,7 +208,7 @@
def try_close(file):
try:
file.close()
- except IOError as e:
+ except IOError, e:
logging.warning(e, exc_info=True)
self.serverTransport.listen()
@@ -242,7 +242,7 @@
self.processor.process(iprot, oprot)
except TTransport.TTransportException, tx:
pass
- except Exception as e:
+ except Exception, e:
logging.exception(e)
ecode = 1
finally:
@@ -253,7 +253,7 @@
except TTransport.TTransportException, tx:
pass
- except Exception as x:
+ except Exception, x:
logging.exception(x)
def collect_children(self):