aboutsummaryrefslogtreecommitdiffstats
path: root/becommands
diff options
context:
space:
mode:
Diffstat (limited to 'becommands')
-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'):