From 5398da9d76b6e4a9e733aa2da0de104141f79822 Mon Sep 17 00:00:00 2001 From: Borgar Date: Thu, 16 Jun 2011 12:46:40 +0000 Subject: [PATCH] read_settings should be passed a string argument This solves a crash when user runs with no settings: `pelican .` --- pelican/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 4d942e3b..6348618a 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -102,7 +102,7 @@ def main(): parser.add_argument('-m', '--markup', default=None, dest='markup', help='the list of markup language to use (rst or md). Please indicate ' 'them separated by commas') - parser.add_argument('-s', '--settings', dest='settings', + parser.add_argument('-s', '--settings', dest='settings', default='', help='the settings of the application. Default to False.') parser.add_argument('-d', '--delete-output-directory', dest='delete_outputdir', action='store_true', help='Delete the output directory.') @@ -124,8 +124,6 @@ def main(): # the variable with None. markup = [a.strip().lower() for a in args.markup.split(',')] if args.markup else None - if args.settings is None: - settings = {} settings = read_settings(args.settings) cls = settings.get('PELICAN_CLASS')