No need to explicitly specify request_queue and response_queue on Worker derived classes
This commit is contained in:
parent
d1ea69262a
commit
0cef9c6070
1 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
import multiprocessing
|
||||
import socket
|
||||
|
||||
from typing import Optional
|
||||
|
@ -17,9 +16,8 @@ class ScanResult:
|
|||
class Scanner(Worker):
|
||||
timeout = 1.5
|
||||
|
||||
def __init__(self, request_queue: multiprocessing.Queue, response_queue: multiprocessing.Queue,
|
||||
port: int = WemoRunner.default_port):
|
||||
super().__init__(request_queue, response_queue)
|
||||
def __init__(self, port: int = WemoRunner.default_port, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.port = port
|
||||
|
||||
def process(self, addr: str) -> Optional[ScanResult]:
|
||||
|
|
Loading…
Reference in a new issue