Skip to content

Commit

Permalink
Merge pull request #1956 from pevogam/cartesian-config-resource-fix
Browse files Browse the repository at this point in the history
Fix resource warnings due to open file in the Cartesian config
  • Loading branch information
Satheesh Rajendran authored Feb 13, 2019
2 parents 1c61a46 + 1f19b53 commit 524f3cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion virttest/cartesian_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ def __init__(self, filename):
:parse filename: The name of the input file.
"""
StrReader.__init__(self, open(filename).read())
with open(filename) as f:
StrReader.__init__(self, f.read())
self.filename = filename


Expand Down

0 comments on commit 524f3cf

Please sign in to comment.