From: W. Trevor King Date: Wed, 14 Jul 2010 23:36:25 +0000 (-0400) Subject: Avoid loading the whole bugdir when calling `be html -e`. X-Git-Tag: 1.0.0~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3472f94db6fda30ab53c5f1b747095fad1ac3c3b;p=be.git 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`. --- 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 """