Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(compose): resolve unclosed file warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Jul 17, 2019
1 parent 0c737a9 commit 2b7c3f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gnes/composer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ def __init__(self, args):

self._layers = [] # type: List['YamlGraph.Layer']
self.logger = set_logger(self.__class__.__name__)
tmp = _yaml.load(args.yaml_path)
stream = StringIO()
_yaml.dump(tmp, stream)
with args.yaml_path:
tmp = _yaml.load(args.yaml_path)
stream = StringIO()
_yaml.dump(tmp, stream)
self.original_yaml = stream.getvalue()
self.name = tmp.get('name', args.name)
self.port = tmp.get('port', args.port)
Expand Down

0 comments on commit 2b7c3f1

Please sign in to comment.