Python twisted.internet.error.ReactorNotRunning() Examples
The following are 10
code examples of twisted.internet.error.ReactorNotRunning().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
twisted.internet.error
, or try the search function
.
Example #1
Source File: monitor.py From txTrader with MIT License | 5 votes |
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
Example #2
Source File: monitor.py From txTrader with MIT License | 5 votes |
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
Example #3
Source File: base.py From Safejumper-for-Desktop with GNU General Public License v2.0 | 5 votes |
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
Example #4
Source File: test_task.py From Safejumper-for-Desktop with GNU General Public License v2.0 | 5 votes |
def stop(self): """ Stop the reactor. """ if not self._running: raise error.ReactorNotRunning() self._running = False
Example #5
Source File: spawnsvc.py From ccs-twistedextensions with Apache License 2.0 | 5 votes |
def goodbye(reason): """ Stop the process if stdin is closed. """ try: reactor.stop() except ReactorNotRunning: pass return origLost(reason)
Example #6
Source File: base.py From learn_python3_spider with MIT License | 5 votes |
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
Example #7
Source File: test_task.py From learn_python3_spider with MIT License | 5 votes |
def stop(self): """ Stop the reactor. """ if not self._running: raise error.ReactorNotRunning() self._running = False
Example #8
Source File: upgrade.py From ccs-calendarserver with Apache License 2.0 | 5 votes |
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
Example #9
Source File: common.py From wifibroadcast with GNU General Public License v3.0 | 5 votes |
def fatal_error(stop_reactor=True): global __system_failed __system_failed = True if stop_reactor: try: reactor.stop() except ReactorNotRunning: pass
Example #10
Source File: base.py From python-for-android with Apache License 2.0 | 5 votes |
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