commit/StationPlaylist: josephsl: SPL Engine/SPL Encoder: do not bother with a dead SPL Encoder object when Studio exits.

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Thu, 20 Nov 2014 09:31:27 -0000

1 new commit in StationPlaylist:

https://bitbucket.org/nvdaaddonteam/stationplaylist/commits/c2ef0b7005dc/
Changeset:   c2ef0b7005dc
Branch:      splengine
User:        josephsl
Date:        2014-11-20 09:30:51+00:00
Summary:     SPL Engine/SPL Encoder: do not bother with a dead SPL Encoder 
object when Studio exits.

Affected #:  1 file

diff --git a/addon/appModules/splengine.py b/addon/appModules/splengine.py
index 01bbba4..fcda357 100755
--- a/addon/appModules/splengine.py
+++ b/addon/appModules/splengine.py
@@ -191,17 +191,21 @@ class AppModule(appModuleHandler.AppModule):
                attempt = 0
                while True:
                        time.sleep(0.001)
+                       try:
+                               statChild = encoderWindow.children[1]
+                       except IndexError:
+                               return # Don't leave zombie objects around.
                        attempt += 1
                        if attempt%250 == 0:
                                tones.beep(500, 50)
-                               if attempt>= 500 and 
encoderWindow.children[1].name == "Disconnected":
+                               if attempt>= 500 and statChild.name == 
"Disconnected":
                                        self.connecting_SPL = False
                                        tones.beep(250, 250)
                                        return
-                       if "Unable to connect" in encoderWindow.name or 
"failed" in encoderWindow.name:
-                               ui.message(encoderWindow.children[1].name)
+                       if "Unable to connect" in statChild.name or "Failed" in 
statChild.name:
+                               ui.message(statChild.name)
                                break
-                       if encoderWindow.children[1].name == "Connected":
+                       if statChild.name == "Connected":
                                # We're on air, so exit.
                                tones.beep(1000, 150)
                                break

Repository URL: https://bitbucket.org/nvdaaddonteam/stationplaylist/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

Other related posts:

  • » commit/StationPlaylist: josephsl: SPL Engine/SPL Encoder: do not bother with a dead SPL Encoder object when Studio exits. - commits-noreply