Revision f9153c84
b/image_creator/main.py | ||
---|---|---|
206 | 206 |
|
207 | 207 |
image = disk.get_image(snapshot) |
208 | 208 |
|
209 |
# If no customization is to be applied, the image should be mounted ro
|
|
209 |
# If no customization is to be done, the image should be mounted ro
|
|
210 | 210 |
ro = (not (options.sysprep or options.shrink) or options.print_sysprep) |
211 | 211 |
image.mount(ro) |
212 | 212 |
try: |
... | ... | |
224 | 224 |
return 0 |
225 | 225 |
|
226 | 226 |
if options.sysprep: |
227 |
err_msg = "Unable to apply the system preparation tasks." |
|
227 |
err_msg = "Unable to perform the system preparation tasks. " \ |
|
228 |
"Couldn't mount the media%s. Use --no-sysprep if you " \ |
|
229 |
"don't won't to perform any system preparation task." |
|
228 | 230 |
if not image.mounted: |
229 |
raise FatalError("%s Couldn't mount the media." % err_msg)
|
|
231 |
raise FatalError(err_msg % "")
|
|
230 | 232 |
elif image.mounted_ro: |
231 |
raise FatalError("%s Couldn't mount the media read-write." |
|
232 |
% err_msg) |
|
233 |
raise FatalError(err_msg % " read-write") |
|
233 | 234 |
image.os.do_sysprep() |
234 | 235 |
|
235 | 236 |
metadata = image.os.meta |
Also available in: Unified diff