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):
part_type = 'RAW'
else:
part_type = 'Unknown
part_type = 'Unknown'
return part_type
@ -288,7 +288,7 @@ def remove_volume_letters(keep=None):
with open(DISKPART_SCRIPT, 'w') as script:
for vol in get_volumes():
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')
# Run script
@ -319,7 +319,7 @@ def scan_disks():
# Done
return disks
def select_disk(title='Which disk?', disks):
def select_disk(title='Which disk?', disks=[]):
"""Select a disk from the attached disks"""
# Build menu
disk_options = []

View file

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