Python cx_Oracle 模块,InterfaceError() 实例源码

我们从Python开源项目中,提取了以下17个代码示例,用于说明如何使用cx_Oracle.InterfaceError()

项目:autoinjection    作者:ChengWiLL    | 项目源码 | 文件源码
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()
项目:Eagle    作者:magerx    | 项目源码 | 文件源码
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()
项目:Helix    作者:3lackrush    | 项目源码 | 文件源码
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()
项目:autoscan    作者:b01u    | 项目源码 | 文件源码
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()
项目:CodingDojo    作者:ComputerSocietyUNB    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:DjangoBlog    作者:0daybug    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:autoinjection    作者:ChengWiLL    | 项目源码 | 文件源码
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
项目:trydjango18    作者:wei0104    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:lifesoundtrack    作者:MTG    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:Eagle    作者:magerx    | 项目源码 | 文件源码
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
项目:Helix    作者:3lackrush    | 项目源码 | 文件源码
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
项目:liberator    作者:libscie    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:djanoDoc    作者:JustinChavez    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:autoscan    作者:b01u    | 项目源码 | 文件源码
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
项目:django-next-train    作者:bitpixdigital    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:LatinSounds_AppEnviaMail    作者:G3ek-aR    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass
项目:django-wechat-api    作者:crazy-canux    | 项目源码 | 文件源码
def close(self):
        try:
            self.cursor.close()
        except Database.InterfaceError:
            # already closed
            pass