示例#1
0
 def _filtered_magic(self, f):
     try:
         mime = sekoiamagic(f)
         wildcard_mime_filter = mime in self.mime_filter
         wildcard_mime_zip = mime in self.mime_zip
         if "*" in self.mime_filter:
             wildcard_mime_filter = True
         if "*" in self.mime_zip:
             wildcard_mime_zip = True
         return wildcard_mime_filter, wildcard_mime_zip, mime
     except Exception as e:
         self.logger.error(e)
         return False, False, None
示例#2
0
 def _filtered_magic(self, f):
     try:
         mime = sekoiamagic(f)
         wildcard_mime_filter = mime in self.mime_filter
         wildcard_mime_zip = mime in self.mime_zip
         if "*" in self.mime_filter:
             wildcard_mime_filter = True
         if "*" in self.mime_zip:
             wildcard_mime_zip = True
         return wildcard_mime_filter, wildcard_mime_zip, mime
     except Exception as e:
         self.logger.error(e)
         return False, False, None
示例#3
0
 def _filtered_magic(self, f):
     mime = sekoiamagic(f)
     return (mime in self.mime_filter, mime in self.mime_zip, mime)
示例#4
0
 def _filtered_magic(self, f):
     mime = sekoiamagic(f)
     return (mime in self.mime_filter, mime in self.mime_zip, mime)