From 0f87a22c20a019f49455005542d4c60216ce39d2 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 14 Dec 2009 20:13:30 -0500 Subject: Transitioned merge to Command-format --- libbe/command/comment.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbe/command/comment.py') diff --git a/libbe/command/comment.py b/libbe/command/comment.py index 3ec4062..23def57 100644 --- a/libbe/command/comment.py +++ b/libbe/command/comment.py @@ -37,8 +37,8 @@ class Comment (libbe.command.Command): >>> cmd._setup_io = lambda i_enc,o_enc : None >>> cmd.stdout = sys.stdout - >>> cmd.run(bd.storage, bd, {'user-id':u'Fran\\xe7ois'}, - ... ['/a', 'This is a comment about a']) + >>> ret = cmd.run(bd.storage, bd, {'user-id':u'Fran\\xe7ois'}, + ... ['/a', 'This is a comment about a']) >>> bd.flush_reload() >>> bug = bd.bug_from_uuid('a') >>> bug.load_comments(load_full=False) @@ -57,12 +57,12 @@ class Comment (libbe.command.Command): >>> if 'EDITOR' in os.environ: ... del os.environ['EDITOR'] - >>> cmd.run(bd.storage, bd, {'user-id':u'Frank'}, ['/b']) + >>> ret = cmd.run(bd.storage, bd, {'user-id':u'Frank'}, ['/b']) Traceback (most recent call last): UserError: No comment supplied, and EDITOR not specified. >>> os.environ['EDITOR'] = "echo 'I like cheese' > " - >>> cmd.run(bd.storage, bd, {'user-id':u'Frank'}, ['/b']) + >>> ret = cmd.run(bd.storage, bd, {'user-id':u'Frank'}, ['/b']) >>> bd.flush_reload() >>> bug = bd.bug_from_uuid('b') >>> bug.load_comments(load_full=False) @@ -139,6 +139,7 @@ class Comment (libbe.command.Command): for key in ['alt-id', 'author', 'content-type']: if params[key] != None: setattr(new, key, params[key]) + return 0 def _long_help(self): return """ -- cgit