diff --git a/src/common/pep.py b/src/common/pep.py index f5609dc4c..bf4cb15e6 100644 --- a/src/common/pep.py +++ b/src/common/pep.py @@ -169,7 +169,7 @@ def user_activity(items, name, jid): contact.activity['text'] = text def user_send_mood(account, mood, message = ''): - if gajim.config.get('publish_mood') == False: + if not gajim.config.get('publish_mood'): return item = xmpp.Node('mood', {'xmlns': xmpp.NS_MOOD}) if mood != '': @@ -181,7 +181,7 @@ def user_send_mood(account, mood, message = ''): gajim.connections[account].send_pb_publish('', xmpp.NS_MOOD, item, '0') def user_send_activity(account, activity, subactivity = '', message = ''): - if gajim.config.get('publish_activity') == False: + if not gajim.config.get('publish_activity'): return item = xmpp.Node('activity', {'xmlns': xmpp.NS_ACTIVITY}) if activity != '': @@ -195,8 +195,8 @@ def user_send_activity(account, activity, subactivity = '', message = ''): gajim.connections[account].send_pb_publish('', xmpp.NS_ACTIVITY, item, '0') def user_send_tune(account, artist = '', title = '', source = '', track = 0,length = 0, items = None): - if (gajim.config.get('publish_tune') == False) or \ - (gajim.connections[account].pep_supported == False): + if (not gajim.config.get('publish_tune')) or \ + (not gajim.connections[account].pep_supported): return item = xmpp.Node('tune', {'xmlns': xmpp.NS_TUNE}) if artist != '': diff --git a/src/common/zeroconf/zeroconf_bonjour.py b/src/common/zeroconf/zeroconf_bonjour.py index 79d699ba4..884ef59ea 100644 --- a/src/common/zeroconf/zeroconf_bonjour.py +++ b/src/common/zeroconf/zeroconf_bonjour.py @@ -245,7 +245,7 @@ class Zeroconf: return True def remove_announce(self): - if self.announced == False: + if not self.announced: return False try: self.service_sdRef.close() diff --git a/src/config.py b/src/config.py index c6796f0d8..71217c960 100644 --- a/src/config.py +++ b/src/config.py @@ -533,7 +533,7 @@ class PreferencesWindow: gajim.interface.save_config() def on_publish_mood_checkbutton_toggled(self, widget): - if widget.get_active() == False: + if not widget.get_active(): for account in gajim.connections: if gajim.connections[account].pep_supported: pep.user_send_mood(account, '') @@ -541,7 +541,7 @@ class PreferencesWindow: helpers.update_optional_features() def on_publish_activity_checkbutton_toggled(self, widget): - if widget.get_active() == False: + if not widget.get_active(): for account in gajim.connections: if gajim.connections[account].pep_supported: pep.user_send_activity(account, '') @@ -549,7 +549,7 @@ class PreferencesWindow: helpers.update_optional_features() def on_publish_tune_checkbutton_toggled(self, widget): - if widget.get_active() == False: + if not widget.get_active(): for account in gajim.connections: if gajim.connections[account].pep_supported: pep.user_send_tune(account, '') diff --git a/src/roster_window.py b/src/roster_window.py index 8abc1d605..b0f6b5dc8 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -5403,7 +5403,7 @@ class RosterWindow: elif contacts_transport != transport: contacts_transport = False - if contacts_transport == False: + if not contacts_transport: # they are not all from the same transport invite_menuitem.set_sensitive(False) return