Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
def driver_params(self):
try:
self.params.driver.as_string()
except errors.TypeError:
return self.params.driver
return {}