X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=nfvbench%2Fcredentials.py;h=7c488794099504c6b152fef73c46127948cd3f28;hb=HEAD;hp=a707ba39a8975a59c379820e8c0258a90f9b0dd2;hpb=5eb7734c9e0ebb49071283dfe7f060b02a664f38;p=nfvbench.git diff --git a/nfvbench/credentials.py b/nfvbench/credentials.py index a707ba3..7c48879 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, encoding="utf-8") as rc_file: + self.__parse_openrc(rc_file) else: LOG.error('Error: rc file does not exist %s', openrc_file) success = False