How to use the yay.errors function in yay

To help you get started, we’ve selected a few yay examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yaybu / yaybu / yaybu / provisioner / resource.py View on Github external
raise error.ParseError(
                "'%s' cannot be defined multiple times" % resource.id, anchor=instance.anchor)

        self[resource.id] = resource

        # Create implicit File[] nodes for any watched files
        try:
            for watched in resource.watch:
                res = bind({
                    "name": watched,
                    "policy": "watched",
                })
                res.parent = instance
                w = self.add("File", res)
                w._original_hash = None
        except errors.NoMatching:
            pass

        return resource
github yaybu / yaybu / yaybu / compute / part.py View on Github external
def driver_params(self):
        try:
            self.params.driver.as_string()
        except errors.TypeError:
            return self.params.driver
        return {}