Revision b21b5519 image_creator/main.py
b/image_creator/main.py | ||
---|---|---|
121 | 121 |
"input media", default=[], action="append", |
122 | 122 |
metavar="SYSPREP") |
123 | 123 |
|
124 |
parser.add_option("--print-sysprep-params", dest="print_sysprep_params", |
|
125 |
default=False, help="print the needed sysprep parameters" |
|
126 |
" for this input media", action="store_true") |
|
127 |
|
|
124 | 128 |
parser.add_option("--sysprep-param", dest="sysprep_params", default=[], |
125 | 129 |
help="Add KEY=VALUE system preparation parameter", |
126 | 130 |
action="append") |
... | ... | |
191 | 195 |
options = parse_options(sys.argv[1:]) |
192 | 196 |
|
193 | 197 |
if options.outfile is None and not options.upload and not \ |
194 |
options.print_sysprep: |
|
195 |
raise FatalError("At least one of `-o', `-u' or `--print-sysprep' "
|
|
196 |
"must be set") |
|
198 |
options.print_sysprep and not options.print_sysprep_params:
|
|
199 |
raise FatalError("At least one of `-o', `-u', `--print-sysprep' or "
|
|
200 |
"`--print-sysprep-params' must be set")
|
|
197 | 201 |
|
198 | 202 |
if options.silent: |
199 | 203 |
out = SilentOutput() |
... | ... | |
279 | 283 |
image.os.print_syspreps() |
280 | 284 |
out.output() |
281 | 285 |
|
286 |
if options.print_sysprep_params: |
|
287 |
image.os.print_sysprep_params() |
|
288 |
out.output() |
|
289 |
|
|
282 | 290 |
if options.outfile is None and not options.upload: |
283 | 291 |
return 0 |
284 | 292 |
|
Also available in: Unified diff