Skip to content

PreprocessingException causes a crash when running on OpenShift spec downloaded from a live server #119

@ceridwen

Description

@ceridwen

When the PreprocessingException is caught and this line is executed, https://github.com/openshift/openshift-restclient-python/blob/master/scripts/from_gen/preprocess_spec.py#L126, on Python 2.7 and 3.x it will raise an AttributeError because the .message attribute on BaseException was a deprecated feature only available in 2.6: https://sayspy.blogspot.ie/2007/05/baseexceptionmessage-is-now-deprecated.html . I can submit a pull request to fix this, it's straightforward. I don't know if the underlying error is something I should be worried about. The form I'm seeing it in my tests is:

scripts.from_gen.preprocess_spec.PreprocessingException: Cannot find listNamespacedServiceAccount

I've had a hard time replicating this issue. The systems I'm seeing this happen on is Python 3.5 on Ubuntu 16.04, but it's not reliable: one machine shows it, the other shows it only some of the time. My best guess is that there's nondeterminism because of dict iteration order, that the process of reading the spec somehow involves the network, or both.

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