mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Further pleasing the pylint gods
This commit is contained in:
@@ -11,7 +11,7 @@ from lib.core.data import logger
|
||||
from lib.core.enums import CUSTOM_LOGGING
|
||||
from lib.core.enums import TIMEOUT_STATE
|
||||
|
||||
def timeout(func, args=(), kwargs={}, duration=1, default=None):
|
||||
def timeout(func, args=None, kwargs=None, duration=1, default=None):
|
||||
class InterruptableThread(threading.Thread):
|
||||
def __init__(self):
|
||||
threading.Thread.__init__(self)
|
||||
@@ -20,7 +20,7 @@ def timeout(func, args=(), kwargs={}, duration=1, default=None):
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
self.result = func(*args, **kwargs)
|
||||
self.result = func(*(args or ()), **(kwargs or {}))
|
||||
self.timeout_state = TIMEOUT_STATE.NORMAL
|
||||
except Exception as ex:
|
||||
logger.log(CUSTOM_LOGGING.TRAFFIC_IN, ex)
|
||||
|
||||
Reference in New Issue
Block a user