projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8f67af
)
"be comment" now handles the default options.content_type.
author
W. Trevor King
<wking@drexel.edu>
Tue, 30 Jun 2009 19:26:56 +0000
(15:26 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Tue, 30 Jun 2009 19:26:56 +0000
(15:26 -0400)
Previously it choked when options.content_type == None.
I'm not sure how that made it past test_usage.sh...
becommands/comment.py
patch
|
blob
|
history
diff --git
a/becommands/comment.py
b/becommands/comment.py
index b31a6e7701eab927ba9b342e061d98cbbcf85a01..09f246a311b0de1af85806743143d264156351f9 100644
(file)
--- a/
becommands/comment.py
+++ b/
becommands/comment.py
@@
-93,7
+93,8
@@
def execute(args, test=False):
raise cmdutil.UserError("No comment entered.")
body = body.decode('utf-8')
elif args[1] == '-': # read body from stdin
- binary = not options.content_type.startswith("text/")
+ binary = not (options.content_type == None
+ or options.content_type.startswith("text/"))
if not binary:
body = sys.stdin.read()
if not body.endswith('\n'):