def disable_for_loaddata(signal_handler):
    @wraps(signal_handler)
    def wrapper(*args, **kwargs):
        for fr in inspect.stack():
            if inspect.getmodulename(fr[1]) == 'loaddata':
                return
        signal_handler(*args, **kwargs)
    return wrapper
Disconnect the volume.
dataset/ETHPy150Open Tivix/django-common/django_common/decorators.py/disable_for_loaddata--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/volume/volume.py/LibvirtBaseVolumeDriver.disconnect_volume