From 1f821ce2f65bff857a24c0cb29d34080fef1e09c Mon Sep 17 00:00:00 2001 From: Massimo Santini Date: Mon, 14 Feb 2011 15:35:17 +0100 Subject: [PATCH] Fixed path definition from settings/command line opt --- pelican/__init__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index f599cc46..05b8c216 100755 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -18,13 +18,14 @@ class Pelican(object): before doing anything else. """ self.path = path or settings['PATH'] - if path or self.path.endswith('/'): + if not self.path: + raise Exception('you need to specify a path to search the docs on !') + if self.path.endswith('/'): self.path = path[:-1] # define the default settings self.settings = settings self.theme = theme or settings['THEME'] - self.path = path output_path = output_path or settings['OUTPUT_PATH'] self.output_path = os.path.realpath(output_path) self.markup = markup or settings['MARKUP'] @@ -39,11 +40,6 @@ class Pelican(object): else: raise Exception("Impossible to find the theme %s" % theme) - # get the list of files to parse - if not self.path: - raise Exception('you need to specify a path to search the docs on !') - - def run(self): """Run the generators and return"""