Skip to content

Error in new mirobo/protocol.py #54

@SelmaUrban

Description

@SelmaUrban

Hello rytilahti,
the new protocol.py caused an error:

File "/mirobo/protocol.py", line 42, in verify_token
raise ValueError("Token must be of length 32")
ValueError: Token must be of length 32

This is the code block:

    @staticmethod
    def verify_token(token: bytes):
        if not isinstance(token, bytes):
            raise TypeError("Token must be bytes")
        if len(token) != 32:
            raise ValueError("Token must be of length 32")

I think

if len(token) != 32:

must be

if len(token) != 16:

because of "bytes".


Short question:
Why is
# click.echo("DND enabled: %s" % res.dnd)
# click.echo("Map present: %s" % res.map)
# click.echo("in_cleaning: %s" % res.in_cleaning)
comment out in vacuum_cli.py?


Greetings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions