python/aubio/aubioclass.py: print filename of file that failed opening
authorPaul Brossier <piem@piem.org>
Fri, 25 Sep 2009 23:55:27 +0000 (01:55 +0200)
committerPaul Brossier <piem@piem.org>
Fri, 25 Sep 2009 23:55:27 +0000 (01:55 +0200)
python/aubio/aubioclass.py

index 84ab9ae10ac6b3076aebb916456112cc64b07776..c2c221ea1760cd2415338a14ff59dc11d0eaef36 100644 (file)
@@ -42,7 +42,8 @@ class sndfile:
             self.file = new_aubio_sndfile_wo(model.file,filename)
         else:
             self.file = new_aubio_sndfile_ro(filename)
-        if self.file == None: raise(ValueError, "failed opening file")
+        if self.file == None:
+            raise(ValueError, "failed opening file %s" % filename)
     def __del__(self):
         if self.file != None: del_aubio_sndfile(self.file)
     def info(self):