Comment 2 for bug 1639279

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/393841
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=188abdac404aee028bc701d74fa9c3066674465d
Submitter: Jenkins
Branch: master

commit 188abdac404aee028bc701d74fa9c3066674465d
Author: Gorka Eguileor <email address hidden>
Date: Fri Nov 4 17:23:47 2016 +0100

    Fix compatibility with decorator < 4.0.x

    Decorator library didn't add the decorate method until v4.0, so current
    code doesn't work with minimum version we have in our requirements
    (v3.4.0).

    The easiest fix would be to bump our requirements version, but as the
    bug states this would create problems for RHEL/CentOS 7 and Ubuntu
    Trusty.

    Another option would be to use the `decorator` method instead, but this
    has been deprecated in v4.0, and although the code is still there it
    isn't a good idea to use it on v4.0 as it could go away at any moment.

    So this patch adds compatibility code to work with both versions, taking
    into account that `decorator` and `decorate` arguments are reversed from
    one method to the other.

    Change-Id: Ia263b4aacb22a8270ccd46a006252a4bcfd80ebc
    Closes-Bug: #1639279