diff options
Diffstat (limited to 'nfvbench/credentials.py')
-rw-r--r-- | nfvbench/credentials.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nfvbench/credentials.py b/nfvbench/credentials.py index a707ba3..7562896 100644 --- a/nfvbench/credentials.py +++ b/nfvbench/credentials.py @@ -138,7 +138,8 @@ class Credentials(object): if openrc_file: if isinstance(openrc_file, str): if os.path.exists(openrc_file): - self.__parse_openrc(open(openrc_file)) + with open(openrc_file) as rc_file: + self.__parse_openrc(rc_file) else: LOG.error('Error: rc file does not exist %s', openrc_file) success = False |