diff options
| author | Joshua Adelman <joshua.adelman@gmail.com> | 2012-07-20 07:38:16 -0400 |
|---|---|---|
| committer | Joshua Adelman <joshua.adelman@gmail.com> | 2012-07-20 07:38:16 -0400 |
| commit | 607502446981bcda29ad07a68f65b83118ff3aff (patch) | |
| tree | 3f571b9d34ebb7fee42d1d679d3ffeb99b6b0714 | |
| parent | 20d5c1ab13125e9758cc661d98012346e1804bbf (diff) | |
| download | pelican-607502446981bcda29ad07a68f65b83118ff3aff.tar.gz | |
Modify system path to ensure current directory is included
| -rw-r--r-- | pelican/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pelican/__init__.py b/pelican/__init__.py index 9bdc34a8..ba48c4c7 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -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: |
