Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-image-creator
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-image-creator
Commits
69aa33fa
Commit
69aa33fa
authored
13 years ago
by
Nikos Skalkotos
Browse files
Options
Downloads
Patches
Plain Diff
Fix cli options help messages
parent
d603d80d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
image_creator/main.py
+8
-8
8 additions, 8 deletions
image_creator/main.py
with
8 additions
and
8 deletions
image_creator/main.py
+
8
−
8
View file @
69aa33fa
...
...
@@ -64,31 +64,31 @@ def parse_options(input_args):
parser
=
optparse
.
OptionParser
(
version
=
version
,
usage
=
usage
)
parser
.
add_option
(
"
-f
"
,
"
--force
"
,
dest
=
"
force
"
,
default
=
False
,
action
=
"
store_true
"
,
help
=
"
O
verwrite output files if they exist
"
)
action
=
"
store_true
"
,
help
=
"
o
verwrite output files if they exist
"
)
parser
.
add_option
(
"
--no-cleanup
"
,
dest
=
"
cleanup
"
,
default
=
True
,
help
=
"
D
on
'
t cleanup sensitive data
before extracting the image
"
,
help
=
"
d
on
'
t cleanup sensitive data
"
,
action
=
"
store_false
"
)
parser
.
add_option
(
"
--no-sysprep
"
,
dest
=
"
sysprep
"
,
default
=
True
,
help
=
"
D
on
'
t perform system preperation
before extracting the image
"
,
help
=
"
d
on
'
t perform system preperation
"
,
action
=
"
store_false
"
)
parser
.
add_option
(
"
--no-shrink
"
,
dest
=
"
shrink
"
,
default
=
True
,
help
=
"
D
on
'
t shrink any partition
before extracting the image
"
,
help
=
"
d
on
'
t shrink any partition
"
,
action
=
"
store_false
"
)
parser
.
add_option
(
"
-o
"
,
"
--outfile
"
,
type
=
"
string
"
,
dest
=
"
outfile
"
,
default
=
None
,
action
=
"
callback
"
,
callback
=
check_writable_dir
,
help
=
"
Output
image
file
"
,
help
=
"
dump
image
to FILE
"
,
metavar
=
"
FILE
"
)
parser
.
add_option
(
"
-u
"
,
"
--upload
"
,
dest
=
"
upload
"
,
default
=
False
,
help
=
"
U
pload image to
a
pithos
repository using kamaki
"
,
help
=
"
u
pload
the
image to pithos
"
,
action
=
"
store_true
"
)
parser
.
add_option
(
"
-r
"
,
"
--register
"
,
dest
=
"
register
"
,
default
=
False
,
help
=
"
R
egister image to okeanos
using kamaki
"
,
action
=
"
store_true
"
)
help
=
"
r
egister
the
image to
~
okeanos
"
,
action
=
"
store_true
"
)
options
,
args
=
parser
.
parse_args
(
input_args
)
...
...
@@ -115,7 +115,7 @@ def image_creator():
raise
FatalError
(
"
You must run %s as root
"
\
%
os
.
path
.
basename
(
sys
.
argv
[
0
]))
if
not
options
.
force
:
if
not
options
.
force
and
options
.
outfile
is
not
None
:
for
extension
in
(
''
,
'
.meta
'
):
filename
=
"
%s%s
"
%
(
options
.
outfile
,
extension
)
if
os
.
path
.
exists
(
filename
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment