mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
Another minor patch
This commit is contained in:
parent
83add9fd9b
commit
47af7dfe6a
|
@ -10,6 +10,7 @@ try:
|
||||||
except:
|
except:
|
||||||
import pickle
|
import pickle
|
||||||
|
|
||||||
|
import itertools
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
@ -24,7 +25,9 @@ def _size_of(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retval = sys.getsizeof(object)
|
retval = sys.getsizeof(object)
|
||||||
if hasattr(object, "__iter__"):
|
if isinstance(object, dict):
|
||||||
|
retval += sum(_size_of(_) for _ in itertools.chain.from_iterable(object.items()))
|
||||||
|
elif hasattr(object, "__iter__"):
|
||||||
retval += sum(_size_of(_) for _ in object)
|
retval += sum(_size_of(_) for _ in object)
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user