mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Further pleasing the pylint gods
This commit is contained in:
@@ -57,10 +57,10 @@ class _GetchMacCarbon(object):
|
||||
"""
|
||||
def __init__(self):
|
||||
import Carbon
|
||||
Carbon.Evt # see if it has this (in Unix, it doesn't)
|
||||
|
||||
_ = Carbon.Evt # see if it has this (in Unix, it doesn't)
|
||||
|
||||
def __call__(self):
|
||||
import Carbon
|
||||
if Carbon.Evt.EventAvail(0x0008)[0] == 0: # 0x0008 is the keyDownMask
|
||||
return ''
|
||||
else:
|
||||
|
||||
@@ -635,7 +635,7 @@ def attackDumpedTable():
|
||||
col_passwords = set()
|
||||
attack_dict = {}
|
||||
|
||||
for column in sorted(columns, key=lambda _: len(_), reverse=True):
|
||||
for column in sorted(columns, key=len, reverse=True):
|
||||
if column and column.lower() in COMMON_USER_COLUMNS:
|
||||
col_user = column
|
||||
break
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -66,9 +66,6 @@ class xrange(object):
|
||||
def __hash__(self):
|
||||
return hash(self._slice)
|
||||
|
||||
def __cmp__(self, other):
|
||||
return (cmp(type(self), type(other)) or cmp(self._slice, other._slice))
|
||||
|
||||
def __repr__(self):
|
||||
return '%s(%r, %r, %r)' % (type(self).__name__, self.start, self.stop, self.step)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user