Example #1
0
    def setup(self, storage):
        """ Check the availability and size of the image.
        """
        # This is on purpose, we don't want to call LiveImagePayload's setup method.
        # FIXME: this should be solved on a inheritance level not like this
        Payload.setup(self, storage)

        if self.data.method.url.startswith("file://"):
            error = self._setup_file_image()
        else:
            error = self._setup_url_image()

        if error:
            exn = PayloadInstallError(str(error))
            if errorHandler.cb(exn) == ERROR_RAISE:
                raise exn

        log.debug("liveimg size is %s", self._min_size)
Example #2
0
 def unsetup(self):
     # Skip LiveImagePayload's unsetup method
     # FIXME: this should be solved on a inheritance level not like this
     Payload.unsetup(self)