aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/cmdutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/cmdutil.py')
-rw-r--r--libbe/cmdutil.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py
index 7414e46..ada0423 100644
--- a/libbe/cmdutil.py
+++ b/libbe/cmdutil.py
@@ -56,9 +56,11 @@ def iter_commands():
def get_command(command_name):
"""Retrieves the module for a user command
- >>> get_command("asdf")
- Traceback (most recent call last):
- UnknownCommand: Unknown command asdf
+ >>> try:
+ ... get_command("asdf")
+ ... except UnknownCommand, e:
+ ... print e
+ Unknown command asdf
>>> repr(get_command("list")).startswith("<module 'becommands.list' from ")
True
"""