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 SystemExit
 
 
 def loop():

-------------------------------------------------------------------------
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

Reply via email to