From: Paul Brossier Date: Sun, 19 Aug 2012 07:01:02 +0000 (-0600) Subject: timeside/decoder/core.py: raise discover not run exception if the file exist only X-Git-Tag: 0.3.4-noleekmp3~12 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=31d2f587af01c91556b646068527c6f8b38c4551;p=timeside.git timeside/decoder/core.py: raise discover not run exception if the file exist only --- diff --git a/timeside/decoder/core.py b/timeside/decoder/core.py index 1018897..be5fab9 100644 --- a/timeside/decoder/core.py +++ b/timeside/decoder/core.py @@ -55,15 +55,15 @@ class FileDecoder(Processor): if os.path.exists(uri): # get the absolute path uri = os.path.abspath(uri) + # first run the file/uri through the discover pipeline + self.discover(uri) + if not self.was_discovered: + raise Exception('discovered was not run') # and make a uri of it from urllib import quote self.uri = 'file://'+quote(uri) else: self.uri = uri - # first run the file/uri through the discover pipeline - self.discover(uri) - if not self.was_discovered: - raise Exception('discovered was not run') def setup(self, channels = None, samplerate = None, nframes = None): # the output data format we want