Bugfix: find_windows_image()
This commit is contained in:
parent
5d32f3c94a
commit
a6f9518648
1 changed files with 14 additions and 11 deletions
|
|
@ -56,17 +56,20 @@ def find_windows_image(windows_version):
|
||||||
# Check for network source
|
# Check for network source
|
||||||
if not image:
|
if not image:
|
||||||
mount_windows_share()
|
mount_windows_share()
|
||||||
if not WINDOWS_SERVER['Mounted']:
|
if WINDOWS_SERVER['Mounted']:
|
||||||
return None
|
for ext in ['esd', 'wim', 'swm']:
|
||||||
for ext in ['esd', 'wim', 'swm']:
|
path = r'\\{}\{}\images\{}.ext'.format(
|
||||||
path = r'\\{}\{}\images\{}.ext'.format(
|
WINDOWS_SERVER['IP'],
|
||||||
WINDOWS_SERVER['IP'], WINDOWS_SERVER['Share'], imagefile, ext)
|
WINDOWS_SERVER['Share'],
|
||||||
if os.path.isfile(path) and wim_contains_image(path, imagename):
|
imagefile,
|
||||||
image['Path'] = path
|
ext)
|
||||||
image['Source'] = None
|
if os.path.isfile(path) and wim_contains_image(path, imagename):
|
||||||
if ext == 'swm':
|
image['Path'] = path
|
||||||
image['Glob'] = '--ref="{}*.swm"'.format(image['Path'][:-4])
|
image['Source'] = None
|
||||||
break
|
if ext == 'swm':
|
||||||
|
image['Glob'] = '--ref="{}*.swm"'.format(
|
||||||
|
image['Path'][:-4])
|
||||||
|
break
|
||||||
|
|
||||||
# Display image to be used (if any) and return
|
# Display image to be used (if any) and return
|
||||||
if image:
|
if image:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue