projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1ec8cb
)
aubioclass.py: make sndfile raise error if file not opened, do not delete it if ...
author
Paul Brossier
<piem@piem.org>
Thu, 1 Nov 2007 14:14:29 +0000
(15:14 +0100)
committer
Paul Brossier
<piem@piem.org>
Thu, 1 Nov 2007 14:14:29 +0000
(15:14 +0100)
python/aubio/aubioclass.py
patch
|
blob
|
history
diff --git
a/python/aubio/aubioclass.py
b/python/aubio/aubioclass.py
index 4269e29a011e5ccfa8aede3753b50b58353b6607..b6e5be38787364ff243599f084bd2113d6071941 100644
(file)
--- a/
python/aubio/aubioclass.py
+++ b/
python/aubio/aubioclass.py
@@
-42,8
+42,9
@@
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")
def __del__(self):
- del_aubio_sndfile(self.file)
+
if self.file != None:
del_aubio_sndfile(self.file)
def info(self):
aubio_sndfile_info(self.file)
def samplerate(self):