diff --git a/qweechat/buffer.py b/qweechat/buffer.py index cfe51fc..d4a7ef3 100644 --- a/qweechat/buffer.py +++ b/qweechat/buffer.py @@ -131,14 +131,14 @@ class BufferWidget(QtGui.QWidget): def set_title(self, title): """Set buffer title.""" self.title.clear() - if not title is None: + if title is not None: self.title.setText(title) def set_prompt(self, prompt): """Set prompt.""" if self.hbox_edit.count() > 1: self.hbox_edit.takeAt(0) - if not prompt is None: + if prompt is not None: label = QtGui.QLabel(prompt) label.setContentsMargins(0, 0, 5, 0) self.hbox_edit.insertWidget(0, label) diff --git a/qweechat/weechat/protocol.py b/qweechat/weechat/protocol.py index 95ddbe4..19d0e13 100644 --- a/qweechat/weechat/protocol.py +++ b/qweechat/weechat/protocol.py @@ -55,7 +55,7 @@ class WeechatObject: self.separator1 = '\n%s' % self.indent if separator == '\n' else '' def _str_value(self, v): - if type(v) is str and not v is None: + if type(v) is str and v is not None: return '\'%s\'' % v return str(v)