aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/comment.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/command/comment.py')
-rw-r--r--libbe/command/comment.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbe/command/comment.py b/libbe/command/comment.py
index bfd24fe..c579610 100644
--- a/libbe/command/comment.py
+++ b/libbe/command/comment.py
@@ -126,7 +126,7 @@ class Comment (libbe.command.Command):
bugdir,bug,parent = (
libbe.command.util.bugdir_bug_comment_from_user_id(
bugdirs, params['id']))
- if params['comment'] == None:
+ if params['comment'] is None:
# try to launch an editor for comment-body entry
try:
if parent == bug.comment_root:
@@ -144,7 +144,7 @@ class Comment (libbe.command.Command):
if body is None:
raise libbe.command.UserError('No comment entered.')
elif params['comment'] == '-': # read body from stdin
- binary = not (params['content-type'] == None
+ binary = not (params['content-type'] is None
or params['content-type'].startswith("text/"))
if not binary:
body = self.stdin.read()
@@ -156,12 +156,12 @@ class Comment (libbe.command.Command):
body = params['comment']
if not body.endswith('\n'):
body+='\n'
- if params['author'] == None:
+ if params['author'] is None:
params['author'] = self._get_user_id()
new = parent.new_reply(body=body, content_type=params['content-type'])
for key in ['alt-id', 'author']:
- if params[key] != None:
+ if params[key] is not None:
setattr(new, new._setting_name_to_attr_name(key), params[key])
if params['full-uuid']:
comment_id = new.id.long_user()