mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Minor refactoring
This commit is contained in:
@@ -16,7 +16,6 @@ from lib.core.threads import getCurrentThreadData
|
||||
|
||||
_cache = {}
|
||||
_cache_lock = threading.Lock()
|
||||
_method_locks = {}
|
||||
|
||||
def cachedmethod(f):
|
||||
"""
|
||||
@@ -87,14 +86,12 @@ def stackedmethod(f):
|
||||
return _
|
||||
|
||||
def lockedmethod(f):
|
||||
lock = threading.RLock()
|
||||
|
||||
@functools.wraps(f)
|
||||
def _(*args, **kwargs):
|
||||
if f not in _method_locks:
|
||||
_method_locks[f] = threading.RLock()
|
||||
|
||||
with _method_locks[f]:
|
||||
with lock:
|
||||
result = f(*args, **kwargs)
|
||||
|
||||
return result
|
||||
|
||||
return _
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.9.7.0"
|
||||
VERSION = "1.9.7.1"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
||||
Reference in New Issue
Block a user