Browse Source

raise the correct error if the flac module won't work...

warn when it is not available..

[git-p4: depot-paths = "//depot/": change = 1674]
main
John-Mark Gurney 12 years ago
parent
commit
1ff96856e6
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      flac.py

+ 6
- 1
flac.py View File

@@ -43,7 +43,12 @@ except OSError:
array.array('h', [ inbuf[chanmap[x % nchan]][x / nchan] for x in
xrange(blksize * nchan)])

flaclib = CDLL('libFLAC.so')
try:
flaclib = CDLL('libFLAC.so')
except OSError, e:
import warnings
warnings.warn('libFLAC.so not installed. FLAC decoding not available.')
raise ImportError(str(e))

# Defines



Loading…
Cancel
Save