def run(self):
        docker_version = self.docker.version()
        self.log.info("docker-squash version %s, Docker %s, API %s..." %
                      (version, docker_version['GitCommit'], docker_version['ApiVersion']))

        if self.image is None:
            raise SquashError("Image is not provided")

        if not (self.output_path or self.load_image):
            self.log.warn(
                "No output path specified and loading into Docker is not selected either; squashed image would not accessible, proceeding with squashing doesn't make sense")
            return

        if self.output_path and os.path.exists(self.output_path):
            self.log.warn(
                "Path '%s' specified as output path where the squashed image should be saved already exists, it'll be overriden" % self.output_path)

        if StrictVersion(docker_version['ApiVersion']) >= StrictVersion("1.22"):
            image = V2Image(self.log, self.docker, self.image,
                            self.from_layer, self.tmp_dir, self.tag)
        else:
            image = V1Image(self.log, self.docker, self.image,
                            self.from_layer, self.tmp_dir, self.tag)

        self.log.info(image.FORMAT % "Using %s image format")

        try:
            return self.squash(image)
        except:
            # https://github.com/goldmann/docker-scripts/issues/44
            # If development mode is not enabled, make sure we clean up the
            # temporary directory
            if not self.development:
                image.cleanup()

            raise
dataset/ETHPy150Open goldmann/docker-squash/docker_squash/squash.py/Squash.run/swapped operands of `%`