Rob Shortt wrote:
> Author: rshortt
> Date: Wed Jan 9 09:46:01 2008
> New Revision: 2963
>
> Log:
> Check to see if reactor is runnning, handle exit a bit better.
>
>
> Modified:
> trunk/base/src/notifier/pynotifier/nf_twisted.py
>
> Modified: trunk/base/src/notifier/pynotifier/nf_twisted.py
> ==============================================================================
> --- trunk/base/src/notifier/pynotifier/nf_twisted.py (original)
> +++ trunk/base/src/notifier/pynotifier/nf_twisted.py Wed Jan 9 09:46:01 2008
> @@ -214,12 +214,18 @@
>
>
> def step(sleep = True, external = True, simulate = False):
> - global __timers
> -
> - reactor.runUntilCurrent()
> - t2 = reactor.timeout()
> - t = reactor.running and t2
> - reactor.doIteration(t)
> + if reactor.running:
> + try:
> + reactor.runUntilCurrent()
> + t2 = reactor.timeout()
> + t = reactor.running and t2
> + reactor.doIteration(t)
> + except:
> + log.error("problem running reactor - exiting")
> + raise SystemExit
> + else:
> + log.info("reactor stopped - exiting")
> + raise SystemExitWhat happens if you call setp without ever calling loop before? Dischi -- Never eat more than you can lift. - Miss Piggy
pgp02eHdo24WV.pgp
Description: PGP signature
------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ Freevo-cvslog mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog
