From 3472f94db6fda30ab53c5f1b747095fad1ac3c3b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 14 Jul 2010 19:36:25 -0400 Subject: Avoid loading the whole bugdir when calling `be html -e`. This cleans up Mathieu Clabaut's fix to the html_gen definition problems in `be html -e`. --- libbe/command/html.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libbe') diff --git a/libbe/command/html.py b/libbe/command/html.py index f4273e9..c61d6d8 100644 --- a/libbe/command/html.py +++ b/libbe/command/html.py @@ -104,8 +104,11 @@ class HTML (libbe.command.Command): ]) def _run(self, **params): - bugdir = self._get_bugdir() - bugdir.load_all_bugs() + if params['export-template'] == True: + bugdir = None + else: + bugdir = self._get_bugdir() + bugdir.load_all_bugs() html_gen = HTMLGen(bugdir, template=params['template-dir'], title=params['title'], @@ -117,7 +120,6 @@ class HTML (libbe.command.Command): html_gen.write_default_template(params['export-template-dir']) else: html_gen.run(params['output']) - return 0 def _long_help(self): return """ -- cgit