Make winexe an optional dependency
[snf-image-creator] / image_creator / os_type / windows.py
index 7c4c127..b758e03 100644 (file)
@@ -139,6 +139,11 @@ class Windows(OSBase):
             raise FatalError(
                 'For windows support libguestfs 1.16.11 or above is required')
 
+        # Check if winexe is installed
+        if not WinEXE.is_installed():
+            raise FatalError(
+                "For windows support `Winexe' needs to be installed")
+
         device = self.image.g.part_to_dev(self.root)
 
         self.last_part_num = self.image.g.part_list(device)[-1]['part_num']