A couple of stylistic changes
This commit is contained in:
parent
96da87bccb
commit
4064512c83
|
@ -35,20 +35,13 @@ class MediaMonitorCommon:
|
||||||
# if file doesn't have any extension, info[-2] throws exception
|
# if file doesn't have any extension, info[-2] throws exception
|
||||||
# Hence, checking length of info before we do anything
|
# Hence, checking length of info before we do anything
|
||||||
if(len(info) >= 2):
|
if(len(info) >= 2):
|
||||||
if(info[-2].lower() in self.supported_file_formats):
|
return info[-2].lower() in self.supported_file_formats
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def is_audio_file(self, filename):
|
def is_audio_file(self, filename):
|
||||||
info = filename.split(".")
|
info = filename.split(".")
|
||||||
|
return info[-1].lower() in self.supported_file_formats
|
||||||
if(info[-1].lower() in self.supported_file_formats):
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
#check if file is readable by "nobody"
|
#check if file is readable by "nobody"
|
||||||
def is_user_readable(self, filepath, euid='nobody', egid='nogroup'):
|
def is_user_readable(self, filepath, euid='nobody', egid='nogroup'):
|
||||||
|
|
Loading…
Reference in New Issue