X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=nfvbench%2Fcredentials.py;h=7562896ad87c636d5797dd3cf58ae6ce15741330;hb=6b8818d15c7f88706ba638df0e5320bc68572e19;hp=a707ba39a8975a59c379820e8c0258a90f9b0dd2;hpb=d746a7456e5e06c90edf61d04bdf33d97e5b958f;p=nfvbench.git 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