(self, filename)
| 108 | return self._handle509Bug(e) |
| 109 | |
| 110 | def from_file(self, filename): |
| 111 | # raise FileNotFoundException or IOError if the file does not exist |
| 112 | with _real_open(filename): |
| 113 | pass |
| 114 | |
| 115 | with self.lock: |
| 116 | try: |
| 117 | return maybe_decode(magic_file(self.cookie, filename)) |
| 118 | except MagicException as e: |
| 119 | return self._handle509Bug(e) |
| 120 | |
| 121 | def from_descriptor(self, fd): |
| 122 | with self.lock: |