aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-06-30 15:26:56 -0400
committerW. Trevor King <wking@drexel.edu>2009-06-30 15:26:56 -0400
commit92b9b013ea13ea1278600488bc1ce65d226a92c8 (patch)
treed7d5a56aa253ccb4b8f2086751caf587006572b3
parentb8f67af510fe92bb4250c779bf48ac246561a6df (diff)
downloadbugseverywhere-92b9b013ea13ea1278600488bc1ce65d226a92c8.tar.gz
"be comment" now handles the default options.content_type.
Previously it choked when options.content_type == None. I'm not sure how that made it past test_usage.sh...
-rw-r--r--becommands/comment.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/becommands/comment.py b/becommands/comment.py
index b31a6e7..09f246a 100644
--- 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'):