python类InterfaceError()的实例源码

connector.py 文件源码 项目:autoinjection 作者: ChengWiLL 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def connect(self):
        self.initConnection()
        self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db)
        self.__dsn = utf8encode(self.__dsn)
        self.user = utf8encode(self.user)
        self.password = utf8encode(self.password)

        try:
            self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
            logger.info("successfully connected as SYSDBA")
        except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError):
            try:
                self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password)
            except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError), msg:
                raise SqlmapConnectionException(msg)

        self.initCursor()
        self.printConnected()
connector.py 文件源码 项目:Eagle 作者: magerx 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def connect(self):
        self.initConnection()
        self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db)
        self.__dsn = utf8encode(self.__dsn)
        self.user = utf8encode(self.user)
        self.password = utf8encode(self.password)

        try:
            self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
            logger.info("successfully connected as SYSDBA")
        except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError):
            try:
                self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password)
            except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError), msg:
                raise SqlmapConnectionException(msg)

        self.initCursor()
        self.printConnected()
connector.py 文件源码 项目:Helix 作者: 3lackrush 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def connect(self):
        self.initConnection()
        self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db)
        self.__dsn = utf8encode(self.__dsn)
        self.user = utf8encode(self.user)
        self.password = utf8encode(self.password)

        try:
            self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
            logger.info("successfully connected as SYSDBA")
        except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError):
            try:
                self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password)
            except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError), msg:
                raise SqlmapConnectionException(msg)

        self.initCursor()
        self.printConnected()
connector.py 文件源码 项目:autoscan 作者: b01u 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def connect(self):
        self.initConnection()
        self.__dsn = cx_Oracle.makedsn(self.hostname, self.port, self.db)
        self.__dsn = utf8encode(self.__dsn)
        self.user = utf8encode(self.user)
        self.password = utf8encode(self.password)

        try:
            self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password, mode=cx_Oracle.SYSDBA)
            logger.info("successfully connected as SYSDBA")
        except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError):
            try:
                self.connector = cx_Oracle.connect(dsn=self.__dsn, user=self.user, password=self.password)
            except (cx_Oracle.OperationalError, cx_Oracle.DatabaseError, cx_Oracle.InterfaceError), msg:
                raise SqlmapConnectionException(msg)

        self.initCursor()
        self.printConnected()
base.py 文件源码 项目:CodingDojo 作者: ComputerSocietyUNB 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
base.py 文件源码 项目:DjangoBlog 作者: 0daybug 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
connector.py 文件源码 项目:autoinjection 作者: ChengWiLL 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def fetchall(self):
        try:
            return self.cursor.fetchall()
        except cx_Oracle.InterfaceError, msg:
            logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg)
            return None
base.py 文件源码 项目:trydjango18 作者: wei0104 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
base.py 文件源码 项目:lifesoundtrack 作者: MTG 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
connector.py 文件源码 项目:Eagle 作者: magerx 项目源码 文件源码 阅读 39 收藏 0 点赞 0 评论 0
def fetchall(self):
        try:
            return self.cursor.fetchall()
        except cx_Oracle.InterfaceError, msg:
            logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg)
            return None
connector.py 文件源码 项目:Helix 作者: 3lackrush 项目源码 文件源码 阅读 39 收藏 0 点赞 0 评论 0
def fetchall(self):
        try:
            return self.cursor.fetchall()
        except cx_Oracle.InterfaceError, msg:
            logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg)
            return None
base.py 文件源码 项目:liberator 作者: libscie 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
base.py 文件源码 项目:djanoDoc 作者: JustinChavez 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
connector.py 文件源码 项目:autoscan 作者: b01u 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def fetchall(self):
        try:
            return self.cursor.fetchall()
        except cx_Oracle.InterfaceError, msg:
            logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg)
            return None
base.py 文件源码 项目:django-next-train 作者: bitpixdigital 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
base.py 文件源码 项目:LatinSounds_AppEnviaMail 作者: G3ek-aR 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
base.py 文件源码 项目:django-wechat-api 作者: crazy-canux 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass


问题


面经


文章

微信
公众号

扫码关注公众号