diff --git a/transWhat/transwhat.py b/transWhat/transwhat.py index 3741216..8e04f75 100755 --- a/transWhat/transwhat.py +++ b/transWhat/transwhat.py @@ -6,8 +6,7 @@ import logging import asyncore import sys -from Spectrum2.iochannel import IOChannel -from Spectrum2.config import SpectrumConfig +import Spectrum2 from yowsup.common import YowConstants from yowsup.stacks import YowStack @@ -39,7 +38,7 @@ logging.basicConfig( ) if args.config is not None: - specConf = SpectrumConfig(args.config) + specConf = Spectrum2.Config(args.config) else: specConf = None @@ -59,7 +58,7 @@ def connectionClosed(): closed = True # Main -io = IOChannel(args.host, args.port, handleTransportData, connectionClosed) +io = Spectrum2.IOChannel(args.host, args.port, handleTransportData, connectionClosed) plugin = WhatsAppBackend(io, args.j, specConf) diff --git a/transWhat/whatsappbackend.py b/transWhat/whatsappbackend.py index 00be791..8133573 100644 --- a/transWhat/whatsappbackend.py +++ b/transWhat/whatsappbackend.py @@ -1,12 +1,12 @@ import logging -from Spectrum2.backend import SpectrumBackend +import Spectrum2 from .session import Session from .registersession import RegisterSession -class WhatsAppBackend(SpectrumBackend): +class WhatsAppBackend(Spectrum2.Backend): def __init__(self, io, spectrum_jid, specConf): - SpectrumBackend.__init__(self) + Spectrum2.Backend.__init__(self) self.logger = logging.getLogger(self.__class__.__name__) self.io = io self.specConf = specConf