pep8: Fix object comparisons

This commit is contained in:
Laurent Bachelier 2014-10-11 01:46:25 +02:00
commit 4f897a8675
4 changed files with 4 additions and 4 deletions

View file

@ -96,7 +96,7 @@ class QueriesQueue(Optimization):
except BrowserUnavailable:
# We consider this profil hasn't been [correctly] analysed
if not id is None:
if id is not None:
self.queue.append((priority, id))
finally:
self.save()

View file

@ -229,7 +229,7 @@ class WeboobCfg(ReplApplication):
first = True
for key, field in module.config.iteritems():
value = field.label
if not field.default is None:
if field.default is not None:
value += ' (default: %s)' % field.default
if first:
print('| | ')

View file

@ -353,7 +353,7 @@ class Application(object):
if self.options.shell_completion:
items = set()
for option in self._parser.option_list:
if not option.help is optparse.SUPPRESS_HELP:
if option.help is not optparse.SUPPRESS_HELP:
items.update(str(option).split('/'))
items.update(self._get_completions())
print(' '.join(items))

View file

@ -95,7 +95,7 @@ class MediaPlayer(object):
Play media.url with the media player.
"""
# if flag play_proxy...
if hasattr(media, '_play_proxy') and media._play_proxy == True:
if hasattr(media, '_play_proxy') and media._play_proxy is True:
# use urllib2 to handle redirect and cookies
self._play_proxy(media, player_name, args)
return None