Removed unused metod

This commit is contained in:
Zloooy 2019-02-03 15:07:59 +03:00
parent f817a2e661
commit b621d51fa0

View File

@ -48,7 +48,6 @@ class MainPresenter:
self.ui.currentThreadsLabel.setText(str(number_of_threads)) self.ui.currentThreadsLabel.setText(str(number_of_threads))
def on_worker_exit(self): def on_worker_exit(self):
print("on_worker_exit called")
self.changeThreadLabel(self.number_of_threads - 1) self.changeThreadLabel(self.number_of_threads - 1)
with self.exit_lock: with self.exit_lock:
for num, thread in enumerate(self.threads): for num, thread in enumerate(self.threads):
@ -58,6 +57,7 @@ class MainPresenter:
break break
if self.number_of_threads == 0: if self.number_of_threads == 0:
self.on_end_scanning() self.on_end_scanning()
def on_end_scanning(self): def on_end_scanning(self):
self.isScanEnabled = False self.isScanEnabled = False
self.ui.startButton.setText("Start") self.ui.startButton.setText("Start")
@ -72,13 +72,9 @@ class MainPresenter:
def log_text(self, string): def log_text(self, string):
self.ui.dataText.append("[" + str(datetime.datetime.now()) + "] " + str(string)) self.ui.dataText.append("[" + str(datetime.datetime.now()) + "] " + str(string))
def setCurrentThreadsLabel(self, threadNumber):
self.ui.currentThreadsLabel.setText(str(threadNumber))
class ScanWorker(QObject): class ScanWorker(QObject):
log_signal = pyqtSignal(str) log_signal = pyqtSignal(str)
exit_signal = pyqtSignal() exit_signal = pyqtSignal()
@ -103,7 +99,8 @@ class ScanWorker(QObject):
self.log_signal.emit('%s has open port: %s' % scan_address) self.log_signal.emit('%s has open port: %s' % scan_address)
else: else:
self.log_signal.emit('%s has closed port: %s' % scan_address) self.log_signal.emit('%s has closed port: %s' % scan_address)
self.stop()
def stop(self): def stop(self):
print("stop called")
self.isRunning = False self.isRunning = False
self.exit_signal.emit() self.exit_signal.emit()