OSDN Git Service

SynthDriver.loadSettings: Catch any exception from setting the voice property, not...
authorJames Teh <jamie@jantrid.net>
Mon, 18 Mar 2013 05:03:13 +0000 (15:03 +1000)
committerJames Teh <jamie@jantrid.net>
Mon, 18 Mar 2013 05:03:13 +0000 (15:03 +1000)
A broken voice is the same as a non-existent voice as far as we're concerned and no synth currently raises LookupError anyway.

source/synthDriverHandler.py

index deae761..46b0b5d 100644 (file)
@@ -445,8 +445,8 @@ class SynthDriver(baseObject.AutoPropertyObject):
                        voice=c.get("voice",None)\r
                        try:\r
                                changeVoice(self,voice)\r
-                       except LookupError:\r
-                               log.warning("No such voice: %s" % voice)\r
+                       except:\r
+                               log.warning("Invalid voice: %s" % voice)\r
                                # Update the configuration with the correct voice.\r
                                c["voice"]=self.voice\r
                                # We need to call changeVoice here so that required initialisation can be performed.\r