Remove default layers, The logging layer causes problems
This commit is contained in:
parent
ebed803984
commit
31bbab2ab1
18
session.py
18
session.py
|
@ -27,7 +27,7 @@ import logging
|
|||
import urllib
|
||||
import time
|
||||
|
||||
from yowsup.stacks import YowStack, YowStackBuilder
|
||||
from yowsup.stacks import YowStack
|
||||
from yowsup.layers import YowLayerEvent, YowParallelLayer
|
||||
from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
|
||||
from yowsup.layers.auth import (YowCryptLayer, YowAuthenticationProtocolLayer,
|
||||
|
@ -82,10 +82,18 @@ class Session():
|
|||
self.bot = Bot(self)
|
||||
|
||||
env.CURRENT_ENV = env.S40YowsupEnv()
|
||||
self.stack = YowStackBuilder()\
|
||||
.pushDefaultLayers(False)\
|
||||
.push(SpectrumLayer)\
|
||||
.build()
|
||||
layers = (SpectrumLayer,
|
||||
YowParallelLayer((YowAuthenticationProtocolLayer,
|
||||
YowMessagesProtocolLayer,
|
||||
YowReceiptProtocolLayer,
|
||||
YowAckProtocolLayer,
|
||||
YowMediaProtocolLayer)),
|
||||
YowCoderLayer,
|
||||
YowCryptLayer,
|
||||
YowStanzaRegulator,
|
||||
YowNetworkLayer
|
||||
)
|
||||
self.stack = YowStack(layers)
|
||||
self.stack.broadcastEvent(
|
||||
YowLayerEvent(SpectrumLayer.EVENT_START,
|
||||
backend = self.backend,
|
||||
|
|
Loading…
Reference in a new issue