mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Minor code style updates
This commit is contained in:
@@ -498,9 +498,7 @@ def scan_stop(taskid):
|
||||
Stop a scan
|
||||
"""
|
||||
|
||||
if (taskid not in DataStore.tasks or
|
||||
DataStore.tasks[taskid].engine_process() is None or
|
||||
DataStore.tasks[taskid].engine_has_terminated()):
|
||||
if (taskid not in DataStore.tasks or DataStore.tasks[taskid].engine_process() is None or DataStore.tasks[taskid].engine_has_terminated()):
|
||||
logger.warning("[%s] Invalid task ID provided to scan_stop()" % taskid)
|
||||
return jsonize({"success": False, "message": "Invalid task ID"})
|
||||
|
||||
@@ -515,9 +513,7 @@ def scan_kill(taskid):
|
||||
Kill a scan
|
||||
"""
|
||||
|
||||
if (taskid not in DataStore.tasks or
|
||||
DataStore.tasks[taskid].engine_process() is None or
|
||||
DataStore.tasks[taskid].engine_has_terminated()):
|
||||
if (taskid not in DataStore.tasks or DataStore.tasks[taskid].engine_process() is None or DataStore.tasks[taskid].engine_has_terminated()):
|
||||
logger.warning("[%s] Invalid task ID provided to scan_kill()" % taskid)
|
||||
return jsonize({"success": False, "message": "Invalid task ID"})
|
||||
|
||||
|
||||
@@ -49,12 +49,10 @@ class xrange(object):
|
||||
return hash(self._slice)
|
||||
|
||||
def __cmp__(self, other):
|
||||
return (cmp(type(self), type(other)) or
|
||||
cmp(self._slice, other._slice))
|
||||
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)
|
||||
return '%s(%r, %r, %r)' % (type(self).__name__, self.start, self.stop, self.step)
|
||||
|
||||
def __len__(self):
|
||||
return self._len()
|
||||
|
||||
Reference in New Issue
Block a user