mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Trivial optimization of BigArray
This commit is contained in:
parent
e9e0b6a7fe
commit
683c258600
3 changed files with 4 additions and 5 deletions
|
|
@ -187,8 +187,7 @@ class BigArray(list):
|
|||
try:
|
||||
handle, filename = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.BIG_ARRAY)
|
||||
self.filenames.add(filename)
|
||||
os.close(handle)
|
||||
with open(filename, "w+b") as f:
|
||||
with os.fdopen(handle, "w+b") as f:
|
||||
f.write(zlib.compress(pickle.dumps(chunk, pickle.HIGHEST_PROTOCOL), BIGARRAY_COMPRESS_LEVEL))
|
||||
return filename
|
||||
except (OSError, IOError) as ex:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue