Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image-creator
Commits
f9153c84
Commit
f9153c84
authored
May 23, 2013
by
Nikos Skalkotos
Browse files
Fix an some error messages in snf-image-creator
parent
e56edd29
Changes
1
Hide whitespace changes
Inline
Side-by-side
image_creator/main.py
View file @
f9153c84
...
...
@@ -206,7 +206,7 @@ def image_creator():
image
=
disk
.
get_image
(
snapshot
)
# If no customization is to be
applied
, the image should be mounted ro
# If no customization is to be
done
, the image should be mounted ro
ro
=
(
not
(
options
.
sysprep
or
options
.
shrink
)
or
options
.
print_sysprep
)
image
.
mount
(
ro
)
try
:
...
...
@@ -224,12 +224,13 @@ def image_creator():
return
0
if
options
.
sysprep
:
err_msg
=
"Unable to apply the system preparation tasks."
err_msg
=
"Unable to perform the system preparation tasks. "
\
"Couldn't mount the media%s. Use --no-sysprep if you "
\
"don't won't to perform any system preparation task."
if
not
image
.
mounted
:
raise
FatalError
(
"%s Couldn't mount the media."
%
err_msg
)
raise
FatalError
(
err_msg
%
""
)
elif
image
.
mounted_ro
:
raise
FatalError
(
"%s Couldn't mount the media read-write."
%
err_msg
)
raise
FatalError
(
err_msg
%
" read-write"
)
image
.
os
.
do_sysprep
()
metadata
=
image
.
os
.
meta
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment