Fix bug in FilesPool.target_dir()

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-06-21 14:41:14 +02:00
parent 7081bd433a
commit e26932a81a
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE

View File

@ -216,7 +216,8 @@ class FilePool(Pool):
are stored
"""
# FIX Remove this if we drop the file backend
import qubes.vm # nopep8
import qubes.vm.templatevm # nopep8
import qubes.vm.dispvm # nopep8
if isinstance(vm, qubes.vm.templatevm.TemplateVM):
subdir = 'vm-templates'
elif isinstance(vm, qubes.vm.dispvm.DispVM):
@ -438,6 +439,7 @@ class VolatileFile(SizeMixIn):
self.path = new_path
self.vid = self.path
def create_sparse_file(path, size):
''' Create an empty sparse file '''
if os.path.exists(path):