Beispiel #1
0
 def check_error(self):
     if self.is_error_packet():
         self.rewind()
         self.advance(1)  # field_count == error (we already know that)
         errno = unpack_uint16(self.read(2))
         if DEBUG: print("errno =", errno)
         raise_mysql_exception(self._data)
Beispiel #2
0
 def check_error(self):
   if self.is_error_packet():
     self.rewind()
     self.advance(1)  # field_count == error (we already know that)
     errno = unpack_uint16(self.read(2))
     if DEBUG: print "errno = %d" % errno
     raise_mysql_exception(self.__data)