storage: Fix some pylint on libvirt without REFLINK flag

This commit is contained in:
Cole Robinson 2015-02-21 16:28:19 -05:00
parent 271e248a41
commit 6e2e43b178

View File

@ -762,7 +762,8 @@ class StorageVolume(_StorageObject):
createflags |= libvirt.VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA
if self.reflink:
cloneflags |= libvirt.VIR_STORAGE_VOL_CREATE_REFLINK
cloneflags |= getattr(libvirt,
"VIR_STORAGE_VOL_CREATE_REFLINK", 1)
try: