From ca58928b6c947e2d86167b3c4342d651339907a7 Mon Sep 17 00:00:00 2001 From: Massimo Santini Date: Fri, 11 Feb 2011 15:36:51 +0100 Subject: [PATCH] Path is an optional argument on the command line, since it can be a setting in the configuration file --- pelican/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index e9a98375..f599cc46 100755 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -18,7 +18,7 @@ class Pelican(object): before doing anything else. """ self.path = path or settings['PATH'] - if self.path.endswith('/'): + if path or self.path.endswith('/'): self.path = path[:-1] # define the default settings @@ -90,7 +90,7 @@ def main(): parser = argparse.ArgumentParser(description="""A tool to generate a static blog, with restructured text input files.""") - parser.add_argument(dest='path', + parser.add_argument(dest='path', nargs='?', help='Path where to find the content files') parser.add_argument('-t', '--theme-path', dest='theme', help='Path where to find the theme templates. If not specified, it will'