def read_config(self, path):
PYVLXLOG.info('<STR_LIT>', path)<EOL>try:<EOL><INDENT>with open(path, '<STR_LIT:r>') as filehandle:<EOL><INDENT>doc = yaml.safe_load(filehandle)<EOL>self.test_configuration(doc, path)<EOL>self.host = doc['<STR_LIT>']['<STR_LIT:host>']<EOL>self.password = doc['<STR_LIT>']['<STR_LIT:password>']<EOL>if '<STR_LIT:port>' in doc['<STR_LIT>']:<EOL><INDENT>self.port = doc['<STR_LIT>']['<STR_LIT:port>']<EOL><DEDENT><DEDENT><DEDENT>except FileNotFoundError as ex:<EOL><INDENT>raise PyVLXException('<STR_LIT>'.format(ex))<EOL><DEDENT>
Read configuration file.