Revision 9b2b47ae

b/image_creator/os_type/windows.py
139 139
            raise FatalError(
140 140
                'For windows support libguestfs 1.16.11 or above is required')
141 141

  
142
        # Check if winexe is installed
143
        if not WinEXE.is_installed():
144
            raise FatalError(
145
                "For windows support `Winexe' needs to be installed")
146

  
142 147
        device = self.image.g.part_to_dev(self.root)
143 148

  
144 149
        self.last_part_num = self.image.g.part_list(device)[-1]['part_num']
b/image_creator/winexe.py
38 38
import subprocess
39 39
import time
40 40
import signal
41
import distutils
41 42

  
42 43
from image_creator.util import FatalError
43 44

  
......
50 51
class WinEXE:
51 52
    """Wrapper class for the winexe command"""
52 53

  
54
    @staticmethod
55
    def is_installed(program='winexe'):
56
        return distutils.spawn.find_executable(program) is not None
57

  
53 58
    def __init__(self, username, password, hostname, program='winexe'):
54 59
        self._host = hostname
55 60
        self._user = username

Also available in: Unified diff