CC-2954: Exception in media monitor using Dropbox
- This will take care of the exception issue
This commit is contained in:
parent
0188dc6c06
commit
455f10f815
|
@ -27,10 +27,15 @@ class MediaMonitorCommon:
|
||||||
def is_temp_file(self, filename):
|
def is_temp_file(self, filename):
|
||||||
info = filename.split(".")
|
info = filename.split(".")
|
||||||
|
|
||||||
|
# if file doesn't have any extension, info[-2] throws exception
|
||||||
|
# Hence, checking length of info before we do anything
|
||||||
|
if(len(info) >= 3):
|
||||||
if(info[-2] in self.supported_file_formats):
|
if(info[-2] in self.supported_file_formats):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
def is_audio_file(self, filename):
|
def is_audio_file(self, filename):
|
||||||
info = filename.split(".")
|
info = filename.split(".")
|
||||||
|
|
Loading…
Reference in New Issue