Changeset cea30b8


Ignore:
Timestamp:
Nov 1, 2007, 3:14:29 PM (16 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
100f950
Parents:
d1ec8cb
Message:

aubioclass.py: make sndfile raise error if file not opened, do not delete it if == None, avoiding several segfaults

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/aubio/aubioclass.py

    rd1ec8cb rcea30b8  
    4343        else:
    4444            self.file = new_aubio_sndfile_ro(filename)
     45        if self.file == None: raise(ValueError, "failed opening file")
    4546    def __del__(self):
    46         del_aubio_sndfile(self.file)
     47        if self.file != None: del_aubio_sndfile(self.file)
    4748    def info(self):
    4849        aubio_sndfile_info(self.file)
Note: See TracChangeset for help on using the changeset viewer.