Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2011-10-27 15:22:49 -04:00
commit cd0ff848fc
1 changed files with 8 additions and 3 deletions

View File

@ -26,9 +26,14 @@ class MediaMonitorCommon:
def is_temp_file(self, filename): def is_temp_file(self, filename):
info = filename.split(".") info = filename.split(".")
if(info[-2] in self.supported_file_formats): # if file doesn't have any extension, info[-2] throws exception
return True # Hence, checking length of info before we do anything
if(len(info) >= 3):
if(info[-2] in self.supported_file_formats):
return True
else:
return False
else: else:
return False return False