Info

[Python] MySQLdb module 업데이트 시 에러

카카루카 2004. 1. 23. 11:21
/usr/local/python23/lib/python2.3/site-packages/MySQLdb 디렉토리의 cursor.py 파일을

다음과 같이 고친다.


class CursorWarningMixIn:

    """This is a MixIn class that provides the capability of raising
    the Warning exception when something went slightly wrong with your
    query."""

    def _check_for_warnings(self):
        from string import atoi, split
        info = self._get_db().info()
        if info is None:
            return
        warnings = atoi(split(info)[-1][:-1])
        if warnings:
            raise Warning, info