Skip to content

Commit

Permalink
Move disk selection to auto_prepare()
Browse files Browse the repository at this point in the history
  • Loading branch information
jakogut committed Mar 24, 2016
1 parent 41f0604 commit 432e063
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions kiwi/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,23 @@ def supports_uefi(self):
return uefi

def auto_prepare(self):
self.select_disk()

if not hasattr(self, 'install_drive'):
return

partitions = glob.glob(self.install_drive + '*')
for part in partitions:
logger.debug('Unmounting partition {}'.format(part))
try: unmount(part)
except CalledProcessError: pass

if self.auto_partition() != self.d.OK: return
if self.auto_format() != self.d.OK: return

self.main_menu.advance()

def auto_partition(self):
self.select_disk()
if not hasattr(self, 'install_drive'):
return

self.logger.info('Partitioning drive ' + self.install_drive)

if self.uefi is False:
self.uefi = self.supports_uefi()
Expand Down

0 comments on commit 432e063

Please sign in to comment.