From: Andy T. <an...@us...> - 2005-09-18 03:59:38
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9735 Modified Files: model.py sound.py Log Message: Making blanket except clauses more specific Index: sound.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/sound.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sound.py 14 Apr 2004 00:17:43 -0000 1.6 --- sound.py 18 Sep 2005 03:59:21 -0000 1.7 *************** *** 7,10 **** --- 7,13 ---- import sndhdr + class SoundFileError(Exception): + pass + class Sound: """ *************** *** 29,33 **** self._sndType = None if not self._sndType: ! raise def play(self, async=True, looped=False) : --- 32,36 ---- self._sndType = None if not self._sndType: ! raise SoundFileError, 'This is not a valid sound file' def play(self, async=True, looped=False) : Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.192 retrieving revision 1.193 diff -C2 -d -r1.192 -r1.193 *** model.py 17 May 2005 16:35:52 -0000 1.192 --- model.py 18 Sep 2005 03:59:21 -0000 1.193 *************** *** 21,25 **** import wx assert wx.VERSION >= (2, 5, 2, 8) ! except: from wxPython.wx import wxPySimpleApp, wxFrame, wxMessageDialog, wxICON_EXCLAMATION, wxOK, wxVERSION_STRING app = wxPySimpleApp() --- 21,25 ---- import wx assert wx.VERSION >= (2, 5, 2, 8) ! except AssertionError: from wxPython.wx import wxPySimpleApp, wxFrame, wxMessageDialog, wxICON_EXCLAMATION, wxOK, wxVERSION_STRING app = wxPySimpleApp() |