Skip to content

Correction for mOTP code on Python 3 #422

@jcrmatos

Description

@jcrmatos

In the book, in example 3 at
http://web2py.com/books/default/chapter/29/09/access-control?search=motp#Other-options-that-can-be-applied-over-the-examples-before-
and if using Python 3, the line
hash = md5(to_hash).hexdigest()[:6]
should be
hash = md5(to_hash.encode(encoding='utf8')).hexdigest()[:6]

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