Skip to content

SystemRandom is not imported correctly #486

@shelman

Description

@shelman

In src/oic/__init__.py, random.SystemRandom is imported via the following code:

try:
    import random.SystemRandom as rnd
except ImportError:
    import random as rnd

In both python2 and python3 this yields an import error and falls back to the random package.

I believe the fix is to change the import to from random import SystemRandom as rnd. The import works locally for me but I am having some trouble with the unit tests and wanted to check in before opening a pull request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions