(self, e)
| 126 | return self._handle509Bug(e) |
| 127 | |
| 128 | def _handle509Bug(self, e): |
| 129 | # libmagic 5.09 has a bug where it might fail to identify the |
| 130 | # mimetype of a file and returns null from magic_file (and |
| 131 | # likely _buffer), but also does not return an error message. |
| 132 | if e.message is None and (self.flags & MAGIC_MIME_TYPE): |
| 133 | return "application/octet-stream" |
| 134 | else: |
| 135 | raise e |
| 136 | |
| 137 | def setparam(self, param, val): |
| 138 | return magic_setparam(self.cookie, param, val) |
no outgoing calls
no test coverage detected