Skip to content

Minor mistake in the README #66

@Te-k

Description

@Te-k

Hi, I noticed a minor mistake in the readme, the on_error function only takes a single exception argument (because it reimplements it and doesn't only callback the WebSocketClient on_error function).

Here is the correct code example that should be in the README:

import certstream

def print_callback(message, context):
    print("Received messaged -> {}".format(message))

def on_open():
    print("Connection successfully established!")

def on_error(exception):
    # Instance is the CertStreamClient instance that barfed
    print("Exception in CertStreamClient! -> {}".format(exception)) 

certstream.listen_for_events(print_callback, on_open=on_open, on_error=on_error, url='wss://certstream.calidog.io/')

(happy to do a PR if needed)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions