storage: fix vm.create_on_disk for non-template based VMs

This commit is contained in:
Marek Marczykowski-Górecki 2016-02-10 17:01:51 +01:00 committed by Wojtek Porczyk
parent 539a46ca9a
commit 5f48b76b27

View File

@ -210,7 +210,7 @@ class Storage(object):
raise NotImplementedError()
def create_on_disk(self, source_template=None):
if source_template is None:
if source_template is None and hasattr(self.vm, 'template'):
source_template = self.vm.template
old_umask = os.umask(002)