Check if scrubbing is supported
[snf-image-creator] / image_creator / os_type / __init__.py
index ec4f20d..f3a33d9 100644 (file)
@@ -85,6 +85,13 @@ class OSBase(object):
         self.out = output
         self.meta = {}
 
+        # Many guestfs compilations don't support scrub
+        self._scrub_support = True
+        try:
+            self.g.available(['scrub'])
+        except RuntimeError:
+            self._scrub_support = False
+
     def collect_metadata(self):
         """Collect metadata about the OS"""
         try: