use new class names from pyspectrum2
This commit is contained in:
parent
8d34923ef5
commit
071f153564
|
@ -6,8 +6,7 @@ import logging
|
||||||
import asyncore
|
import asyncore
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from Spectrum2.iochannel import IOChannel
|
import Spectrum2
|
||||||
from Spectrum2.config import SpectrumConfig
|
|
||||||
from yowsup.common import YowConstants
|
from yowsup.common import YowConstants
|
||||||
from yowsup.stacks import YowStack
|
from yowsup.stacks import YowStack
|
||||||
|
|
||||||
|
@ -39,7 +38,7 @@ logging.basicConfig(
|
||||||
)
|
)
|
||||||
|
|
||||||
if args.config is not None:
|
if args.config is not None:
|
||||||
specConf = SpectrumConfig(args.config)
|
specConf = Spectrum2.Config(args.config)
|
||||||
else:
|
else:
|
||||||
specConf = None
|
specConf = None
|
||||||
|
|
||||||
|
@ -59,7 +58,7 @@ def connectionClosed():
|
||||||
closed = True
|
closed = True
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
io = IOChannel(args.host, args.port, handleTransportData, connectionClosed)
|
io = Spectrum2.IOChannel(args.host, args.port, handleTransportData, connectionClosed)
|
||||||
|
|
||||||
plugin = WhatsAppBackend(io, args.j, specConf)
|
plugin = WhatsAppBackend(io, args.j, specConf)
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import logging
|
import logging
|
||||||
from Spectrum2.backend import SpectrumBackend
|
import Spectrum2
|
||||||
|
|
||||||
from .session import Session
|
from .session import Session
|
||||||
from .registersession import RegisterSession
|
from .registersession import RegisterSession
|
||||||
|
|
||||||
class WhatsAppBackend(SpectrumBackend):
|
class WhatsAppBackend(Spectrum2.Backend):
|
||||||
def __init__(self, io, spectrum_jid, specConf):
|
def __init__(self, io, spectrum_jid, specConf):
|
||||||
SpectrumBackend.__init__(self)
|
Spectrum2.Backend.__init__(self)
|
||||||
self.logger = logging.getLogger(self.__class__.__name__)
|
self.logger = logging.getLogger(self.__class__.__name__)
|
||||||
self.io = io
|
self.io = io
|
||||||
self.specConf = specConf
|
self.specConf = specConf
|
||||||
|
|
Loading…
Reference in a new issue