Skip to content
Snippets Groups Projects
Commit baa01601 authored by Sébastien Helleu's avatar Sébastien Helleu
Browse files

Fix conditions (use "is not")

parent 41157050
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -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)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment