Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stacktrace when enabling debugging #203

Open
ptitdoc opened this issue Jun 25, 2021 · 0 comments
Open

Stacktrace when enabling debugging #203

ptitdoc opened this issue Jun 25, 2021 · 0 comments

Comments

@ptitdoc
Copy link

ptitdoc commented Jun 25, 2021

_componentValues can be NoValue in some situation, which makes debugging crash:

  File "pyasn1/type/univ.py", line 2738, in prettyPrintType
    for idx, componentType in enumerate(self.componentType.values() or self._componentValues):

I fixed the bug by changing this line:

for idx, componentType in enumerate(self.componentType.values() or self._componentValues):

to:

        enum = self.componentType.values()
        if not enum and not isinstance(self._componentValues,base.NoValue):
            enum = self._componentValues
        for idx, componentType in enumerate(enum):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant