Commit d167321e by Guba Sándor Committed by Őry Máté

do not check img format before snapshotting

parent 9bda30ef
...@@ -192,10 +192,8 @@ class Disk(object): ...@@ -192,10 +192,8 @@ class Disk(object):
''' Creating qcow2 snapshot with base image. ''' Creating qcow2 snapshot with base image.
''' '''
# Check if snapshot type and qcow2 format matchmatch # Check if snapshot type and qcow2 format matchmatch
if self.format not in ['qcow2', 'iso']:
raise Exception('Invalid format: %s' % self.format)
if self.type != 'snapshot': if self.type != 'snapshot':
raise Exception('Invalid type: %s' % self.format) raise Exception('Invalid type: %s' % self.type)
# Check if file already exists # Check if file already exists
if os.path.isfile(self.get_path()): if os.path.isfile(self.get_path()):
raise Exception('File already exists: %s' % self.get_path()) raise Exception('File already exists: %s' % self.get_path())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment