Always more cleanup

This commit is contained in:
Alan Mason 2017-12-01 12:02:05 -08:00
parent 90c4189942
commit cd3f3ed8d3
2 changed files with 5 additions and 8 deletions

View file

@ -197,7 +197,7 @@ def get_table_type(disk):
elif REGEX_DISK_RAW.search(output): elif REGEX_DISK_RAW.search(output):
part_type = 'RAW' part_type = 'RAW'
else: else:
part_type = 'Unknown part_type = 'Unknown'
return part_type return part_type
@ -288,7 +288,7 @@ def remove_volume_letters(keep=None):
with open(DISKPART_SCRIPT, 'w') as script: with open(DISKPART_SCRIPT, 'w') as script:
for vol in get_volumes(): for vol in get_volumes():
if vol['Letter'].upper() != keep.upper(): if vol['Letter'].upper() != keep.upper():
script.write('select volume {}\n'.format(vol['Number'])) script.write('select volume {}\n'.format(vol['Number']))
script.write('remove noerr\n') script.write('remove noerr\n')
# Run script # Run script
@ -319,7 +319,7 @@ def scan_disks():
# Done # Done
return disks return disks
def select_disk(title='Which disk?', disks): def select_disk(title='Which disk?', disks=[]):
"""Select a disk from the attached disks""" """Select a disk from the attached disks"""
# Build menu # Build menu
disk_options = [] disk_options = []

View file

@ -150,11 +150,8 @@ def format_mbr(disk):
def mount_windows_share(): def mount_windows_share():
"""Mount the Windows images share unless labeled as already mounted.""" """Mount the Windows images share unless labeled as already mounted."""
if WINDOWS_SERVER['Mounted']: if not WINDOWS_SERVER['Mounted']:
# Blindly skip if we mounted earlier mount_network_share(WINDOWS_SERVER)
continue
mount_network_share(WINDOWS_SERVER)
def select_windows_version(): def select_windows_version():
actions = [ actions = [