Revision e1c0be02 image_creator/image.py
b/image_creator/image.py | ||
---|---|---|
33 | 33 |
# interpreted as representing official policies, either expressed |
34 | 34 |
# or implied, of GRNET S.A. |
35 | 35 |
|
36 |
from image_creator.util import FatalError |
|
36 |
from image_creator.util import FatalError, check_guestfs_version
|
|
37 | 37 |
from image_creator.gpt import GPTPartitionTable |
38 | 38 |
from image_creator.os_type import os_cls |
39 | 39 |
|
... | ... | |
64 | 64 |
# file descriptors. This can cause problems especially if the parent |
65 | 65 |
# process has opened pipes. Since the recovery process is an optional |
66 | 66 |
# feature of libguestfs, it's better to disable it. |
67 |
self.g.set_recovery_proc(0) |
|
68 |
version = self.g.version() |
|
69 |
if version['major'] > 1 or \ |
|
70 |
(version['major'] == 1 and (version['minor'] >= 18 or |
|
71 |
(version['minor'] == 17 and |
|
72 |
version['release'] >= 14))): |
|
73 |
self.g.set_recovery_proc(1) |
|
67 |
if check_guestfs_version(self.g, 1, 17, 14) >= 0: |
|
74 | 68 |
self.out.output("Enabling recovery proc") |
69 |
self.g.set_recovery_proc(1) |
|
70 |
else: |
|
71 |
self.g.set_recovery_proc(0) |
|
75 | 72 |
|
76 | 73 |
#self.g.set_trace(1) |
77 | 74 |
#self.g.set_verbose(1) |
Also available in: Unified diff