2
0
rdb 13 жил өмнө
parent
commit
234619864b

+ 5 - 0
panda/src/nativenet/buffered_datagramconnection.h

@@ -243,7 +243,12 @@ inline bool  Buffered_DatagramConnection::SendMessage(const Datagram &msg)
         nativenet_cat.warning() << "Buffered_DatagramConnection::SendMessage->Error On Write--Out Buffer = " << _Writer.AmountBuffered() << "\n";
         #ifdef HAVE_PYTHON
         ostringstream s;
+
+#if PY_MAJOR_VERSION >= 3
         PyObject *exc_type = PyExc_ConnectionError;
+#else
+        PyObject *exc_type = PyExc_StandardError;
+#endif
         
         s << endl << "Error sending message: " << endl;
         msg.dump_hex(s);