Skip to content

Non-existing dependency-profiles cause multiple errors #68

@ida

Description

@ida

Refs: #64, plone/Products.CMFPlone#2228.

The multiple errors still occur, I think the culprit lies in getProfileDependenciesChain, because it is calling itself recursively:

chain.extend(self.getProfileDependencyChain(dependency, seen))

And the try/except-block in _runImportStepsFromContext of where it's called initially, is masking this:

Probably because the first try succeeds and later an exception occurs from a recursive-call.

So, I tried raising an error explicitly in getProfileDependenciesChain, but that also doesn't stop the execution of further code.

The only solution I came up with, is to return None in getDependenciesForProfile for symbolizing dependencies are broken, like it was sugested in #64:
dd11374

That will cause the interpreter to raise a "not-iterable"-error in getProfileDependenciesChain and fail hard, as wished.

@tseaver, @icemac, @sunew, if you think this is feasible, I'd like to provide another PR.

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