Print errors if errors occurs :) Force to have a path specified.

This commit is contained in:
Alexis Metaireau 2010-08-19 14:48:58 +02:00
commit 4bff6ebeeb
3 changed files with 8 additions and 3 deletions

View file

@ -22,6 +22,9 @@ parser.add_argument('-s', '--settings', dest='settings',
if __name__ == '__main__':
args = parser.parse_args()
files = []
generate_output(args.path, args.templates, args.output, args.markup,
try:
generate_output(args.path, args.templates, args.output, args.markup,
args.settings)
print 'Done !'
print 'Done !'
except Exception, e:
print 'Error ! %s' % e

View file

@ -48,6 +48,8 @@ def generate_output(path=None, theme=None, output_path=None, markup=None,
markup = markup or context['MARKUP']
# get the list of files to parse
if not path:
raise Exception('you need to speciffy a path to search the docs on !')
files = []
for root, dirs, temp_files in os.walk(path, followlinks=True):
files.extend([os.sep.join((root, f)) for f in temp_files

View file

@ -7,7 +7,7 @@ if sys.version_info < (2,7):
setup(
name = "pelican",
version = '1.1',
version = '1.1.1',
url = 'http://hg.lolnet.org/pelican/',
author = 'Alexis Metaireau',
author_email = 'alexis@notmyidea.org',