(self, chunk)
| 184 | self.close() |
| 185 | |
| 186 | def _dump(self, chunk): |
| 187 | try: |
| 188 | handle, filename = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.BIG_ARRAY) |
| 189 | self.filenames.add(filename) |
| 190 | os.close(handle) |
| 191 | with open(filename, "w+b") as f: |
| 192 | f.write(zlib.compress(pickle.dumps(chunk, pickle.HIGHEST_PROTOCOL), BIGARRAY_COMPRESS_LEVEL)) |
| 193 | return filename |
| 194 | except (OSError, IOError) as ex: |
| 195 | errMsg = "exception occurred while storing data " |
| 196 | errMsg += "to a temporary file ('%s'). Please " % ex |
| 197 | errMsg += "make sure that there is enough disk space left. If problem persists, " |
| 198 | errMsg += "try to set environment variable 'TEMP' to a location " |
| 199 | errMsg += "writeable by the current user" |
| 200 | raise SqlmapSystemException(errMsg) |
| 201 | |
| 202 | def _checkcache(self, index): |
| 203 | if self.cache is not None and not isinstance(self.cache, Cache): |
no test coverage detected