diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index 33ba203..c4146cc 100644
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -69,12 +69,12 @@
 // agreement between client and server.
 //
 
-template<class _P>
-class TPedanticProtocol : public _P
+template<typename Proto>
+class TPedanticProtocol : public Proto 
 {
     public:
         TPedanticProtocol(std::shared_ptr<TTransport>& transport)
-          : _P(transport), m_last_seqid((std::numeric_limits<int32_t>::max)() - 10) { }
+          : Proto(transport), m_last_seqid((std::numeric_limits<int32_t>::max)() - 10) { }
 
         virtual uint32_t writeMessageBegin_virt(const std::string& name,
                                            const TMessageType messageType,
@@ -85,14 +85,14 @@
                 seqid = ++m_last_seqid;
             }
 
-            return _P::writeMessageBegin_virt(name, messageType, seqid);
+            return Proto::writeMessageBegin_virt(name, messageType, seqid);
         }
 
         virtual uint32_t readMessageBegin_virt(std::string& name,
                                           TMessageType& messageType,
                                           int32_t& seqid) override
         {
-            uint32_t result = _P::readMessageBegin_virt(name, messageType, seqid);
+            uint32_t result = Proto::readMessageBegin_virt(name, messageType, seqid);
             if (seqid != m_last_seqid) {
                 std::stringstream ss;
                 ss << "ERROR: send request with seqid " << m_last_seqid << " and got reply with seqid " << seqid;
diff --git a/test/crossrunner/run.py b/test/crossrunner/run.py
index ef8fb60..bb06d25 100644
--- a/test/crossrunner/run.py
+++ b/test/crossrunner/run.py
@@ -259,7 +259,7 @@
             raise
         logger.warn('Error executing [%s]', test.name, exc_info=True)
         return (retry_count, RESULT_ERROR)
-    except:
+    except Exception:
         logger.info('Interrupted execution', exc_info=True)
         if not async_mode:
             raise
diff --git a/test/py/TestClient.py b/test/py/TestClient.py
index cc9185c..a85098e 100755
--- a/test/py/TestClient.py
+++ b/test/py/TestClient.py
@@ -26,9 +26,7 @@
 
 from optparse import OptionParser
 from util import local_libpath
-
 sys.path.insert(0, local_libpath())
-
 from thrift.protocol import TProtocolDecorator
 from thrift.protocol import TProtocol
 
@@ -277,6 +275,7 @@
 # running on it (when multiplexec)
 LAST_SEQID = None
 
+
 class TPedanticSequenceIdProtocolWrapper(TProtocolDecorator.TProtocolDecorator):
     """
     Wraps any protocol with sequence ID checking: looks for outbound
@@ -289,7 +288,8 @@
     def writeMessageBegin(self, name, type, seqid):
         global LAST_SEQID
         if LAST_SEQID and LAST_SEQID == seqid:
-            raise TProtocol.TProtocolException(INVALID_DATA,
+            raise TProtocol.TProtocolException(
+                TProtocol.TProtocolException.INVALID_DATA,
                 "Python client reused sequence ID {0}".format(seqid))
         LAST_SEQID = seqid
         super(TPedanticSequenceIdProtocolWrapper, self).writeMessageBegin(
@@ -300,7 +300,8 @@
         (name, type, seqid) =\
             super(TPedanticSequenceIdProtocolWrapper, self).readMessageBegin()
         if LAST_SEQID != seqid:
-            raise TProtocol.TProtocolException(INVALID_DATA,
+            raise TProtocol.TProtocolException(
+                TProtocol.TProtocolException.INVALID_DATA,
                 "We sent seqid {0} and server returned seqid {1}".format(
                     self.last, seqid))
         return (name, type, seqid)
@@ -310,6 +311,7 @@
     """ Wrap a protocol in the pedantic sequence ID wrapper. """
     return TPedanticSequenceIdProtocolWrapper(proto)
 
+
 class MultiplexedOptionalTest(AbstractTest):
     def get_protocol2(self, transport):
         return None
