Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/41#discussion_r94769660
  
    --- Diff: aria/orchestrator/context/common.py ---
    @@ -97,19 +99,49 @@ def download_resource(self, destination, path=None):
             Download a blueprint resource from the resource storage
             """
             try:
    -            return 
self.resource.deployment.download(entry_id=self.deployment.id,
    -                                                     
destination=destination,
    -                                                     path=path)
    +            
self.resource.deployment.download(entry_id=str(self.deployment.id),
    +                                              destination=destination,
    +                                              path=path)
             except exceptions.StorageError:
    -            return 
self.resource.blueprint.download(entry_id=self.blueprint.id,
    -                                                    
destination=destination,
    -                                                    path=path)
    +            
self.resource.blueprint.download(entry_id=str(self.blueprint.id),
    +                                             destination=destination,
    +                                             path=path)
    +
    +    def download_resource_and_render(self, destination, path=None, 
variables=None):
    +        """
    +        Download a blueprint resource from the resource storage render its 
content as a jinja
    +        template using the provided variables. ctx is available to the 
template without providing it
    +        explicitly.
    +        """
    +        self.download_resource(destination=destination, path=path)
    +        with open(destination, 'rb') as f:
    --- End diff --
    
    why the use of rb and wb? since its rendering doesnt it make sense to use r 
and w?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to