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
def _filtered_magic(self, f): mime = sekoiamagic(f) return (mime in self.mime_filter, mime in self.mime_zip, mime)