return nothing if file does not exist

This commit is contained in:
j 2009-01-26 15:21:43 +05:30
parent 7b062f9a4f
commit 0f5252e7a7

View file

@ -34,7 +34,10 @@ class Info:
self.input.props.location = videofile
self.dbin = self.pipeline.get_by_name('dbin')
self.metadata['size'] = os.stat(videofile).st_size
if os.path.exists(videofile):
self.metadata['size'] = os.stat(videofile).st_size
else:
self.metadata['size'] = 0:
if self.metadata['size'] != 0:
self.bus = self.pipeline.get_bus()
self.dbin.connect('new-decoded-pad', self.demux_pad_added)