-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] cleanup autherror and encryptionenabled
Purge references to AuthError Remove all parameters allowing optional enabling of Axolotl Layer
- Loading branch information
Showing
10 changed files
with
27 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
from yowsup.stacks import YowStackBuilder | ||
from .layer import EchoLayer | ||
from yowsup.layers.auth import AuthError | ||
from yowsup.layers import YowLayerEvent | ||
from yowsup.layers.network import YowNetworkLayer | ||
|
||
|
||
class YowsupEchoStack(object): | ||
def __init__(self, credentials, encryptionEnabled = True): | ||
def __init__(self, credentials): | ||
stackBuilder = YowStackBuilder() | ||
|
||
self.stack = stackBuilder\ | ||
.pushDefaultLayers(encryptionEnabled)\ | ||
.pushDefaultLayers()\ | ||
.push(EchoLayer)\ | ||
.build() | ||
|
||
self.stack.setCredentials(credentials) | ||
|
||
def start(self): | ||
self.stack.broadcastEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT)) | ||
try: | ||
self.stack.loop() | ||
except AuthError as e: | ||
print("Authentication Error: %s" % e.message) | ||
self.stack.loop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
from .layer_crypt import YowCryptLayer | ||
from .layer_authentication import YowAuthenticationProtocolLayer | ||
from .autherror import AuthError | ||
#import protocolentities |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters