def isValidDir(self, path): try: if not os.path.isdir(path): raise ValueError(path + ' is not a valid directory') except ValueError as e: os_functions.terminate(e.__str__(), 'Error', self.params) return True
def parser_error_catcher(self, function_call, function_param = ''): try: function_call(function_param) except ConfigParser.NoSectionError as e: os_functions.terminate(e.__str__(), 'Parsing Error', self.params)