Fixing crash on launch, fixingpackaging, bumping to 0.8.3
[nqaap] / src / opt / Nqa-Audiobook-player / Player.py
index cbd900f..951b386 100644 (file)
@@ -18,7 +18,7 @@ class Player(object):
         self.storage = FileStorage.FileStorage(path = constants._data_path_)
         if hildonize.IS_HILDON_SUPPORTED and not hildonize.IS_FREMANTLE_SUPPORTED:
             import SimpleOSSOPlayer as _SimplePlayer
-            SimpleGStreamer = _SimplePlayer # silence PyFlakes
+            SimplePlayer = _SimplePlayer # silence PyFlakes
         else:
             import SimpleGStreamer as SimplePlayer
         self.player = SimplePlayer.SimplePlayer(self.next_chapter)
@@ -54,9 +54,13 @@ class Player(object):
                 bookPath = self._bookPaths[lastBookName]
                 self.set_book(bookPath)
             except KeyError:
-                _moduleLogger.info("Audiobook was not found")
+                               _moduleLogger.exception("Audiobook was not found")
+            except IndexError:
+                               _moduleLogger.exception("Chapter was not found")
             except IOError:
-                _moduleLogger.info("Audiobook could not be loaded")
+                               _moduleLogger.exception("Audiobook could not be loaded")
+            except Exception:
+                               _moduleLogger.exception("Can you say 'confusion'?")
 
     @staticmethod
     def __format_name(path):