Revision e108efd2 image_creator/main.py
b/image_creator/main.py | ||
---|---|---|
148 | 148 |
raise FatalError("At least one of `-o', `-u' or" \ |
149 | 149 |
"`--print-sysprep' must be set") |
150 | 150 |
|
151 |
output('snf-image-creator %s\n' % version) |
|
151 |
title = 'snf-image-creator %s' % version |
|
152 |
output(title) |
|
153 |
output('=' * len(title)) |
|
152 | 154 |
|
153 | 155 |
if os.geteuid() != 0: |
154 | 156 |
raise FatalError("You must run %s as root" \ |
... | ... | |
171 | 173 |
osclass = get_os_class(dev.distro, dev.ostype) |
172 | 174 |
image_os = osclass(dev.root, dev.g) |
173 | 175 |
metadata = image_os.get_metadata() |
174 |
|
|
175 | 176 |
output() |
176 | 177 |
|
177 | 178 |
for sysprep in options.disabled_syspreps: |
... | ... | |
192 | 193 |
|
193 | 194 |
dev.umount() |
194 | 195 |
|
195 |
size = options.shrink and dev.shrink() or dev.size()
|
|
196 |
size = options.shrink and dev.shrink() or dev.size |
|
196 | 197 |
metadata['SIZE'] = str(size // 2 ** 20) |
197 | 198 |
|
198 | 199 |
checksum = md5(snapshot, size) |
Also available in: Unified diff