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