|
|
|
@ -28,7 +28,8 @@ class RootResource:
@@ -28,7 +28,8 @@ class RootResource:
|
|
|
|
|
def pre_init(cls, moin_config_dir): |
|
|
|
|
cls.moin_config_dir = moin_config_dir |
|
|
|
|
moin_farmconfig = os.path.join(moin_config_dir, 'farmconfig.py') |
|
|
|
|
with open(moin_farmconfig, 'r') as fh: |
|
|
|
|
encoding = utils.guess_encoding(moin_farmconfig) |
|
|
|
|
with open(moin_farmconfig, 'r', encoding=encoding) as fh: |
|
|
|
|
cls.moin_wiki_defs = list(utils.extract_wiki_definitions(fh)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -55,7 +56,8 @@ class RootResource:
@@ -55,7 +56,8 @@ class RootResource:
|
|
|
|
|
def _get_wiki_data_dir(self): |
|
|
|
|
wiki_name = self._get_wiki_name() |
|
|
|
|
wiki_config = os.path.join(cls.moin_config_dir, wiki_name + '.py') |
|
|
|
|
with open(wiki_config, 'r') as fh: |
|
|
|
|
encoding = utils.guess_encoding(wiki_config) |
|
|
|
|
with open(wiki_config, 'r', encoding=encoding) as fh: |
|
|
|
|
data_dir = utils.extract_data_dir(fh) |
|
|
|
|
return data_dir |
|
|
|
|
|
|
|
|
|