Commit dd67fecd authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

_artifactcache/ostreecache.py: Turn an ArtifactError() into an assert statement

This should be an assertion as it will trigger a proper BUG
message with a usable stack trace.

An incident of this ArtifactError() was reported in issue #305.
parent 54ba7324
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ def buildref(element, key):
        for x in element.normal_name
    ])

    if key is None:
        raise ArtifactError('Cache key missing')
    assert key is not None

    # assume project and element names are not allowed to contain slashes
    return '{0}/{1}/{2}'.format(project.name, element_name, key)