dabo Commit
Revision 1605
Date: 2005-11-29 18:49:53 -0800 (Tue, 29 Nov 2005)
Author: paul

Changed:
U   trunk/dabo/ui/uiwx/dTimer.py

Log:
Added defensive code to dTimer, which was keeping Adi's demo from loading.


Diff:
Modified: trunk/dabo/ui/uiwx/dTimer.py
===================================================================
--- trunk/dabo/ui/uiwx/dTimer.py        2005-11-30 02:37:51 UTC (rev 1604)
+++ trunk/dabo/ui/uiwx/dTimer.py        2005-11-30 02:49:53 UTC (rev 1605)
@@ -55,8 +55,13 @@
        
                
        def stop(self):
-               self._timer.Stop()
-               return not self._timer.IsRunning()
+               try:
+                       timer = self._timer
+               except AttributeError:
+                       timer = None
+               if timer is not None:
+                       self._timer.Stop()
+                       return not self._timer.IsRunning()
                
                
        # property get/set functions




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to