forked from github/pelican
Modify system path to ensure current directory is included
This commit is contained in:
parent
20d5c1ab13
commit
6075024469
1 changed files with 6 additions and 0 deletions
|
|
@ -60,9 +60,15 @@ class Pelican(object):
|
|||
else:
|
||||
raise Exception("Impossible to find the theme %s" % theme)
|
||||
|
||||
self.init_path()
|
||||
self.init_plugins()
|
||||
signals.initialized.send(self)
|
||||
|
||||
def init_path(self):
|
||||
if not any(p in sys.path for p in ['', '.']):
|
||||
logger.debug("Adding current directory to system path")
|
||||
sys.path.insert(0, '')
|
||||
|
||||
def init_plugins(self):
|
||||
self.plugins = self.settings['PLUGINS']
|
||||
for plugin in self.plugins:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue