Author: Alessio Treglia Description: Encapsulate error messages because of Python string exceptions no more allowed in Python 2.6 Bug-Debian: http://bugs.debian.org/585246 --- src/song.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- listen.orig/src/song.py +++ listen/src/song.py @@ -428,7 +428,7 @@ class Song(dict, Logger): try: self["#bitrate"] = int(audio.info.bitrate) except AttributeError: pass else: - raise "W:Song:MutagenTag:No audio found" + raise Exception("W:Song:MutagenTag:No audio found") #FIXME: Add a real traceback support except Exception, e: @@ -451,7 +451,7 @@ class Song(dict, Logger): is_finalize = False is_tagged = False def unknown_type(*param): - raise "W:Song:GstTag:Gst decoder: type inconnu" + raise Exception("W:Song:GstTag:Gst decoder: type inconnu") def finalize(pipeline): state_ret = pipeline.set_state(gst.STATE_NULL) @@ -484,7 +484,7 @@ class Song(dict, Logger): try: try: pipeline = gst.parse_launch ("gnomevfssrc location="+self.get("uri")+" ! decodebin name=decoder ! fakesink"); except gobject.GError : - raise "W:Song:GstTag:Failed to build pipeline to read metadata of",self.get("uri") + raise Exception("W:Song:GstTag:Failed to build pipeline to read metadata of",self.get("uri")) decoder = pipeline.get_by_name("decoder") decoder.connect("unknown-type",unknown_type) @@ -576,7 +576,7 @@ class Song(dict, Logger): audio.save() else: - raise "w:Song:MutagenTag:No audio found" + raise Exception("w:Song:MutagenTag:No audio found") #FIXME: Add a real traceback support except Exception, e: