aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-16 05:50:31 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-16 05:50:31 -0400
commitdfb7878b674e8eed1cfa55928d5464dc6fb0f085 (patch)
tree7544d8433e20167c184bffda64dd8e3455e96d53 /libbe
parentb39f68dcb0ecdc5f2c3f12fe75b47ff1f4d51e86 (diff)
downloadbugseverywhere-dfb7878b674e8eed1cfa55928d5464dc6fb0f085.tar.gz
Renamed test->manipulate_encodings in becommands.*.execute.
Reminder from my initial libbe/encoding.py commit: Because of the stdout replacement, the doctests executes now need an optional 'test' argument to turn off replacement during the doctests, otherwise doctest flips out (since it had set up stdout to catch output, and then we clobbered it's setup). I'm also trying to catch stdout/stderr from be-handle-mail, and I ran into the same problem. It took me a bit to remember exactly what "test" was supposed to do, so I thought I'd make the argument name more specific. If you need other changes when running in "test" mode, you'll have to add other kwargs.
Diffstat (limited to 'libbe')
-rw-r--r--libbe/cmdutil.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbe/cmdutil.py b/libbe/cmdutil.py
index 36d5d96..e9c16ed 100644
--- a/libbe/cmdutil.py
+++ b/libbe/cmdutil.py
@@ -70,10 +70,11 @@ def get_command(command_name):
return cmd
-def execute(cmd, args):
+def execute(cmd, args, manipulate_encodings=True):
enc = encoding.get_encoding()
cmd = get_command(cmd)
- cmd.execute([a.decode(enc) for a in args])
+ cmd.execute([a.decode(enc) for a in args],
+ manipulate_encodings=manipulate_encodings)
return 0
def help(cmd=None, parser=None):