Thrift-1784: pep-3110 exception handling
Client: py
Patch: jfarrell
Updates python lib for pep-3110
diff --git a/lib/py/src/server/TProcessPoolServer.py b/lib/py/src/server/TProcessPoolServer.py
index eefb623..ae7fe1c 100644
--- a/lib/py/src/server/TProcessPoolServer.py
+++ b/lib/py/src/server/TProcessPoolServer.py
@@ -63,7 +63,7 @@
self.serveClient(client)
except (KeyboardInterrupt, SystemExit):
return 0
- except Exception, x:
+ except Exception as x:
logger.exception(x)
def serveClient(self, client):
@@ -76,9 +76,9 @@
try:
while True:
self.processor.process(iprot, oprot)
- except TTransportException, tx:
+ except TTransportException as tx:
pass
- except Exception, x:
+ except Exception as x:
logger.exception(x)
itrans.close()
@@ -99,7 +99,7 @@
w.daemon = True
w.start()
self.workers.append(w)
- except Exception, x:
+ except Exception as x:
logger.exception(x)
# wait until the condition is set by stop()
@@ -110,7 +110,7 @@
break
except (SystemExit, KeyboardInterrupt):
break
- except Exception, x:
+ except Exception as x:
logger.exception(x)
self.isRunning.value = False