def _show_warnings()

in Code/AuroraSLDataAPIDemo/aslbootstrap/pymysql/cursors.py [0:0]


    def _show_warnings(self):
        if self._warnings_handled:
            return
        self._warnings_handled = True
        if self._result and (self._result.has_next or not self._result.warning_count):
            return
        ws = self._get_db().show_warnings()
        if ws is None:
            return
        for w in ws:
            msg = w[-1]
            if PY2:
                if isinstance(msg, unicode):
                    msg = msg.encode('utf-8', 'replace')
            warnings.warn(err.Warning(*w[1:3]), stacklevel=4)