当前位置: 首页>>代码示例>>Python>>正文


Python error.ReactorNotRunning方法代码示例

本文整理汇总了Python中twisted.internet.error.ReactorNotRunning方法的典型用法代码示例。如果您正苦于以下问题:Python error.ReactorNotRunning方法的具体用法?Python error.ReactorNotRunning怎么用?Python error.ReactorNotRunning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twisted.internet.error的用法示例。


在下文中一共展示了error.ReactorNotRunning方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: clientConnectionFailed

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def clientConnectionFailed(self, connector, reason):
        self.rx._callback('error', 'connection %s failed, reason=%s' % (connector, reason))
        if reactor.running:
            try: 
                reactor.stop()
            except error.ReactorNotRunning:
		pass 
开发者ID:rstms,项目名称:txTrader,代码行数:9,代码来源:monitor.py

示例2: clientConnectionLost

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def clientConnectionLost(self, connector, reason):
        self.rx._callback('error', 'connection %s lost, reason=%s' % (connector, reason))
        if reactor.running:
            try:
                reactor.stop()
            except error.ReactorNotRunning:
		pass 
开发者ID:rstms,项目名称:txTrader,代码行数:9,代码来源:monitor.py

示例3: stop

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def stop(self):
        """
        See twisted.internet.interfaces.IReactorCore.stop.
        """
        if self._stopped:
            raise error.ReactorNotRunning(
                "Can't stop reactor that isn't running.")
        self._stopped = True
        self._justStopped = True
        self._startedBefore = True 
开发者ID:proxysh,项目名称:Safejumper-for-Desktop,代码行数:12,代码来源:base.py

示例4: stop

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def stop(self):
        """
        Stop the reactor.
        """
        if not self._running:
            raise error.ReactorNotRunning()
        self._running = False 
开发者ID:proxysh,项目名称:Safejumper-for-Desktop,代码行数:9,代码来源:test_task.py

示例5: goodbye

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def goodbye(reason):
        """
        Stop the process if stdin is closed.
        """
        try:
            reactor.stop()
        except ReactorNotRunning:
            pass
        return origLost(reason) 
开发者ID:apple,项目名称:ccs-twistedextensions,代码行数:11,代码来源:spawnsvc.py

示例6: postStartService

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def postStartService(self):
        """
        Quit right away
        """
        from twisted.internet import reactor
        from twisted.internet.error import ReactorNotRunning
        try:
            reactor.stop()
        except ReactorNotRunning:
            # I don't care.
            pass 
开发者ID:apple,项目名称:ccs-calendarserver,代码行数:13,代码来源:upgrade.py

示例7: fatal_error

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def fatal_error(stop_reactor=True):
    global __system_failed
    __system_failed = True

    if stop_reactor:
        try:
            reactor.stop()
        except ReactorNotRunning:
            pass 
开发者ID:svpcom,项目名称:wifibroadcast,代码行数:11,代码来源:common.py

示例8: stop

# 需要导入模块: from twisted.internet import error [as 别名]
# 或者: from twisted.internet.error import ReactorNotRunning [as 别名]
def stop(self):
        """
        See twisted.internet.interfaces.IReactorCore.stop.
        """
        if self._stopped:
            raise error.ReactorNotRunning(
                "Can't stop reactor that isn't running.")
        self._stopped = True
        self._justStopped = True 
开发者ID:kuri65536,项目名称:python-for-android,代码行数:11,代码来源:base.py


注:本文中的twisted.internet.error.ReactorNotRunning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。