This commit is contained in:
Jakob Ketterl 2020-04-05 15:22:23 +02:00
parent 2301141b44
commit 366def0235

View File

@ -11,6 +11,7 @@ from owrx.config import Config
from owrx.metrics import Metrics, CounterMetric, DirectMetric from owrx.metrics import Metrics, CounterMetric, DirectMetric
from owrx.pskreporter import PskReporter from owrx.pskreporter import PskReporter
from owrx.parser import Parser from owrx.parser import Parser
from abc import ABCMeta, abstractmethod
import logging import logging
@ -85,7 +86,7 @@ class WsjtQueue(Queue):
self.errorCounter.inc() self.errorCounter.inc()
class WsjtChopper(threading.Thread): class WsjtChopper(threading.Thread, metaclass=ABCMeta):
def __init__(self, source): def __init__(self, source):
self.source = source self.source = source
self.tmp_dir = Config.get()["temporary_directory"] self.tmp_dir = Config.get()["temporary_directory"]
@ -140,11 +141,9 @@ class WsjtChopper(threading.Thread):
os.unlink(filename) os.unlink(filename)
self._scheduleNextSwitch() self._scheduleNextSwitch()
@abstractmethod
def decoder_commandline(self, file): def decoder_commandline(self, file):
""" pass
must be overridden in child classes
"""
return []
def decode(self, file): def decode(self, file):
decoder = subprocess.Popen( decoder = subprocess.Popen(