Comment 3 for bug 1047530

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

Reviewed: https://review.openstack.org/12586
Committed: http://github.com/openstack/nova/commit/67f74991f73fa2c8350c434a7f67c85bf50e4934
Submitter: Jenkins
Branch: master

commit 67f74991f73fa2c8350c434a7f67c85bf50e4934
Author: Vishvananda Ishaya <email address hidden>
Date: Fri Sep 7 17:17:00 2012 +0000

    Stop lock decorator from leaving tempdirs in tests

    In some versions of python 2.7, we must use the nonlocal keyword to
    give an inline function access to a variable in the enclosing scope.
    This leads to a tempdir not beaing cleaned up because a boolean in
    the synchronized decorator doesn't get set properly. Since we are
    still supporting python 2.6, this patch removes the method call
    completely so we don't have to worry about locality.

    The patch also moves acquiring the lock inside the try, except to
    make sure the tempdir is still cleaned even if there is some issue
    with getting the lock.

    Fixes bug 1047530

    Change-Id: Ie3da18262e67de076b1e474c24edd2e4e5208646