conf.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:QuitStore 作者: AKSW 项目源码 文件源码
def __init__(
        self,
        configmode=None,
        configfile='config.ttl',
        repository=None,
        targetdir=None,
        versioning=True
    ):
        """The init method.

        This method checks if the config file is given and reads the config file.
        If the config file is missing, it will be generated after analyzing the
        file structure.
        """
        logger = logging.getLogger('quit.conf.QuitConfiguration')
        logger.debug('Initializing configuration object.')
        self.configchanged = False
        self.sysconf = Graph()
        self.graphconf = None
        self.versioning = versioning
        self.origin = None
        self.graphs = {}
        self.files = {}

        self.quit = Namespace('http://quit.aksw.org/')
        self.nsMngrSysconf = NamespaceManager(self.sysconf)
        self.nsMngrSysconf.bind('', 'http://quit.aksw.org/', override=False)
        self.nsMngrGraphconf = NamespaceManager(self.sysconf)
        self.nsMngrGraphconf.bind('', 'http://quit.aksw.org/', override=False)

        try:
            self.__initstoreconfig(
                repository=repository,
                targetdir=targetdir,
                configfile=configfile,
                configmode=configmode
            )
        except InvalidConfigurationError as e:
            logger.error(e)
            raise e

        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号