equal
deleted
inserted
replaced
330 """ |
330 """ |
331 try: |
331 try: |
332 self.__cfgFile = open(self.__cfgFileName, 'r') |
332 self.__cfgFile = open(self.__cfgFileName, 'r') |
333 self.readfp(self.__cfgFile) |
333 self.readfp(self.__cfgFile) |
334 except (MissingSectionHeaderError, ParsingError), e: |
334 except (MissingSectionHeaderError, ParsingError), e: |
335 self.__cfgFile.close() |
|
336 raise VMMConfigException(str(e), ERR.CONF_ERROR) |
335 raise VMMConfigException(str(e), ERR.CONF_ERROR) |
337 self.__cfgFile.close() |
336 finally: |
|
337 if not self.__cfgFile is None and not self.__cfgFile.closed: |
|
338 self.__cfgFile.close() |
338 |
339 |
339 def check(self): |
340 def check(self): |
340 """Performs a configuration check. |
341 """Performs a configuration check. |
341 |
342 |
342 Raises a VMMConfigException if the check fails. |
343 Raises a VMMConfigException if the check fails. |