Skip to content

Commit

Permalink
Simplify opts merge
Browse files Browse the repository at this point in the history
  • Loading branch information
lblackstone committed Aug 22, 2019
1 parent e3d769c commit 5854fd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/gen/python-templates/CustomResource.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get(resource_name, api_version, kind, id, opts=None):
resource's behavior.
"""

opts = ResourceOptions(id=id) if opts is None else opts.merge(ResourceOptions(id=id))
opts = ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
return CustomResource(resource_name=resource_name, api_version=api_version, kind=kind, opts=opts)

def translate_output_property(self, prop: str) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get(resource_name, api_version, kind, id, opts=None):
resource's behavior.
"""

opts = ResourceOptions(id=id) if opts is None else opts.merge(ResourceOptions(id=id))
opts = ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
return CustomResource(resource_name=resource_name, api_version=api_version, kind=kind, opts=opts)

def translate_output_property(self, prop: str) -> str:
Expand Down

0 comments on commit 5854fd5

Please sign in to comment.