aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/html.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-29 19:49:50 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-29 19:49:50 -0500
commit1d764100cbe15c8fe26b836ed0e9d494ab14500d (patch)
treef697978227d0c66e5922bd43a1b96da8690b472a /libbe/command/html.py
parent6ab6b8d0255ccf3557453fc0762d1529d39462ed (diff)
downloadbugseverywhere-1d764100cbe15c8fe26b836ed0e9d494ab14500d.tar.gz
Remove libbe.ui.util.cmdutil
All of its functionality has moved off into more focused modules.
Diffstat (limited to 'libbe/command/html.py')
-rw-r--r--libbe/command/html.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/libbe/command/html.py b/libbe/command/html.py
index ec818c0..059fe75 100644
--- a/libbe/command/html.py
+++ b/libbe/command/html.py
@@ -119,14 +119,6 @@ directory.
Html = HTML # alias for libbe.command.base.get_command_class()
-def help():
- return get_parser().help_str() + longhelp
-
-def complete(options, args, parser):
- for option, value in cmdutil.option_value_pairs(options, parser):
- if "--complete" in args:
- raise cmdutil.GetCompletions() # no positional arguments for list
-
class HTMLGen (object):
def __init__(self, bd, template=None,
title="Site Title", index_header="Index Header",
@@ -259,8 +251,8 @@ class HTMLGen (object):
% (comment.uuid, comment.content_type),
[per_bug_dir, '.htaccess'], mode='a')
self._write_file( # TODO: long_to_linked_user()
- libbe.util.id.long_to_short_user(
- self.bd, comment.body),
+ libbe.util.id.long_to_short_text(
+ [self.bd], comment.body),
[per_bug_dir, comment.uuid], mode='wb')
else:
value = self._escape(value)
@@ -339,7 +331,8 @@ class HTMLGen (object):
try:
os.makedirs(dir_path)
except:
- raise cmdutil.UsageError, 'Cannot create output directory "%s".' % dir_path
+ raise libbe.command.UserError(
+ 'Cannot create output directory "%s".' % dir_path)
return dir_path
def _write_file(self, content, path_array, mode='w'):