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

do not call external command for symlinking

parent d167321e
...@@ -202,18 +202,17 @@ class Disk(object): ...@@ -202,18 +202,17 @@ class Disk(object):
raise Exception('Image Base does not exists: %s' % self.get_base()) raise Exception('Image Base does not exists: %s' % self.get_base())
# Build list of Strings as command parameters # Build list of Strings as command parameters
if self.format == 'iso': if self.format == 'iso':
cmdline = ['ln', os.symlink(self.get_base(), self.get_path())
'-s', elif self.format == 'raw':
self.get_base(), raise NotImplemented()
self.get_path()]
else: else:
cmdline = ['qemu-img', cmdline = ['qemu-img',
'create', 'create',
'-b', self.get_base(), '-b', self.get_base(),
'-f', self.format, '-f', self.format,
self.get_path()] self.get_path()]
# Call subprocess # Call subprocess
subprocess.check_output(cmdline) subprocess.check_output(cmdline)
def merge(self, new_disk): def merge(self, new_disk):
''' Merging a new_disk from the actual disk and its base. ''' Merging a new_disk from the actual disk and its base.
......
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