Attempt to silence more "No disk" errors

This commit is contained in:
Alan Mason 2017-12-03 09:48:59 -08:00
parent 1848c7dc66
commit e892cd3406
2 changed files with 4 additions and 0 deletions

View file

@ -44,6 +44,7 @@ def find_windows_image(windows_version):
imagename = windows_version['Image Name'] imagename = windows_version['Image Name']
# Search local source # Search local source
set_thread_error_mode(silent=True) # Prevents "No disk" popups
for d in psutil.disk_partitions(): for d in psutil.disk_partitions():
for ext in ['esd', 'wim', 'swm']: for ext in ['esd', 'wim', 'swm']:
path = '{}images\{}.{}'.format(d.mountpoint, imagefile, ext) path = '{}images\{}.{}'.format(d.mountpoint, imagefile, ext)
@ -53,6 +54,7 @@ def find_windows_image(windows_version):
if ext == 'swm': if ext == 'swm':
image['Glob'] = '--ref="{}*.swm"'.format(image['Path'][:-4]) image['Glob'] = '--ref="{}*.swm"'.format(image['Path'][:-4])
break break
set_thread_error_mode(silent=False) # Return to normal
# Check for network source # Check for network source
if not image: if not image:

View file

@ -415,6 +415,7 @@ def select_minidump_path():
assign_volume_letters() assign_volume_letters()
# Search for minidumps # Search for minidumps
set_thread_error_mode(silent=True) # Prevents "No disk" popups
tmp = run_program('mountvol') tmp = run_program('mountvol')
tmp = [d for d in re.findall(r'.*([A-Za-z]):\\', tmp.stdout.decode())] tmp = [d for d in re.findall(r'.*([A-Za-z]):\\', tmp.stdout.decode())]
# Remove RAMDisk letter # Remove RAMDisk letter
@ -423,6 +424,7 @@ def select_minidump_path():
for disk in tmp: for disk in tmp:
if os.path.exists('{}:\\Windows\\MiniDump'.format(disk)): if os.path.exists('{}:\\Windows\\MiniDump'.format(disk)):
dumps.append({'Name': '{}:\\Windows\\MiniDump'.format(disk)}) dumps.append({'Name': '{}:\\Windows\\MiniDump'.format(disk)})
set_thread_error_mode(silent=False) # Return to normal
# Check results before showing menu # Check results before showing menu
if len(dumps) == 0: if len(dumps) == 0: