Commit f20d741f authored by Patrick Shriwise's avatar Patrick Shriwise
Browse files

Updating check for rc file

parent e8827020
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ class PyGriffinConfig:
    elif Path(__MOD_PATH.parent / '.pygriffin.rc').exists():
        _RC_FILE = __MOD_PATH.parent / '.pygriffin.rc'
    else:
        _RC_FILE = None
        warnings.warn('PyGriffin config file (.pygriffin.rc) could not be found.')

    def __init__(self,
@@ -39,11 +40,11 @@ class PyGriffinConfig:
                 isoxml_exec=None,
                 mpi_exec=None):

        cv.check_file('.pygriffin.rc', self._RC_FILE, must_exist=True)

        # always read the config file,
        # even if we don't use it
        self.__config = ConfigParser()

        if self._RC_FILE is not None:
            self.__config.read(str(self._RC_FILE))

        self._griffin_exec = None