diff --git a/src/common/GnuPG.py b/src/common/GnuPG.py
index 72c34a8f926f927eb1e9aaa18c74a5f7ea2707f4..928da7bfc41693372e201f82905ac287d60009cf 100644
--- a/src/common/GnuPG.py
+++ b/src/common/GnuPG.py
@@ -150,7 +150,7 @@ if gajim.HAVE_GPG:
 			return 'BAD_PASSPHRASE'
 
 		def verify(self, str, sign):
-			if str == None:
+			if str is None:
 				return ''
 			f = tmpfile()
 			fd = f.fileno()
diff --git a/src/common/GnuPGInterface.py b/src/common/GnuPGInterface.py
index b86786bb170af6efb7d0b083ae6eda1e3329339c..90830e55497f59164b9589207513d0284502a051 100644
--- a/src/common/GnuPGInterface.py
+++ b/src/common/GnuPGInterface.py
@@ -339,9 +339,9 @@ class GnuPG:
         and can be written to.
         """
         
-        if args == None: args = []
-        if create_fhs == None: create_fhs = []
-        if attach_fhs == None: attach_fhs = {}
+        if args is None: args = []
+        if create_fhs is None: create_fhs = []
+        if attach_fhs is None: attach_fhs = {}
         
         for std in _stds:
             if not attach_fhs.has_key(std) \
diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py
index 0011405d28de00e87226458727558d033ab273dd..ee35525eaf80fab5ba993d59918f6bf7d47930d2 100644
--- a/src/common/connection_handlers.py
+++ b/src/common/connection_handlers.py
@@ -191,7 +191,7 @@ class ConnectionBytestream:
 				ft_add_hosts.append(ft_host)
 		listener = gajim.socks5queue.start_listener(port,
 			sha_str, self._result_socks5_sid, file_props['sid'])
-		if listener == None:
+		if listener is None:
 			file_props['error'] = -5
 			self.dispatch('FILE_REQUEST_ERROR', (unicode(receiver), file_props,
 				''))
diff --git a/src/common/helpers.py b/src/common/helpers.py
index f0f8232ee929ec0163e39abacee1d3f9a6a2521d..c38e9228eb305b41ff41b1264b8de5924f6c9be6 100644
--- a/src/common/helpers.py
+++ b/src/common/helpers.py
@@ -644,7 +644,7 @@ def statuses_unified():
 		if not gajim.config.get_per('accounts', account,
 		'sync_with_global_status'):
 			continue
-		if reference == None:
+		if reference is None:
 			reference = gajim.connections[account].connected
 		elif reference != gajim.connections[account].connected:
 			return False
diff --git a/src/common/optparser.py b/src/common/optparser.py
index e4a29eb8460abce95b7c50d18a36c28811f3cddc..c6952dfc2127fc4f901ba97eefefe64d7e74fd90 100644
--- a/src/common/optparser.py
+++ b/src/common/optparser.py
@@ -83,7 +83,7 @@ class OptionsParser:
 		return True
 
 	def write_line(self, fd, opt, parents, value):
-		if value == None:
+		if value is None:
 			return
 		value = value[1]
 		# convert to utf8 before writing to file if needed
diff --git a/src/common/socks5.py b/src/common/socks5.py
index caa82b67964b517b30e5dc5cc93c2fc0439da45c..3e7feeeb5c6cb510e2d0780a60519ee194a615ad 100644
--- a/src/common/socks5.py
+++ b/src/common/socks5.py
@@ -81,7 +81,7 @@ class SocksQueue:
 		and do a socks5 authentication using sid for generated sha
 		'''
 		self.sha_handlers[sha_str] = (sha_handler, sid)
-		if self.listener == None:
+		if self.listener is None:
 			self.listener = Socks5Listener(self.idlequeue, port)
 			self.listener.queue = self
 			self.listener.bind()
@@ -372,7 +372,7 @@ class Socks5:
 		self.file = None
 	
 	def open_file_for_reading(self):
-		if self.file == None:
+		if self.file is None:
 			try:
 				self.file = open(self.file_props['file-name'],'rb')
 				if self.file_props.has_key('offset') and self.file_props['offset']:
@@ -549,7 +549,7 @@ class Socks5:
 			# return number of read bytes. It can be used in progressbar
 		if fd != None:
 			self.file_props['stalled'] = False
-		if fd == None and self.file_props['stalled'] is False:
+		if fd is None and self.file_props['stalled'] is False:
 			return None
 		if self.file_props.has_key('received-len'):
 			if self.file_props['received-len'] != 0:
@@ -1019,7 +1019,7 @@ class Socks5Receiver(Socks5, IdleObject):
 			if version != 0x05 or method == 0xff:
 				self.disconnect()
 		elif self.state == 4: # get approve of our request
-			if buff == None:
+			if buff is None:
 				return None
 			sub_buff = buff[:4]
 			if len(sub_buff) < 4:
diff --git a/src/common/stanza_session.py b/src/common/stanza_session.py
index 84034dc9e8c8f17a1bd0f1c1e7d78c48775a7775..43faf6a5b3b80ab643eb67c9b2d812335db129a6 100644
--- a/src/common/stanza_session.py
+++ b/src/common/stanza_session.py
@@ -226,11 +226,11 @@ class EncryptedStanzaSession(StanzaSession):
 						self.hmac(k, 'Responder SIGMA Key')		)
 
 	def compress(self, plaintext):
-		if self.compression == None:
+		if self.compression is None:
 			return plaintext
 
 	def decompress(self, compressed):
-		if self.compression == None:
+		if self.compression is None:
 			return compressed
 
 	def encrypt(self, encryptable):
@@ -865,7 +865,7 @@ class EncryptedStanzaSession(StanzaSession):
 	def fail_bad_negotiation(self, reason, fields = None):
 		'''sends an error and cancels everything.
 
-if fields == None, the remote party has given us a bad cryptographic value of some kind
+if fields is None, the remote party has given us a bad cryptographic value of some kind
 
 otherwise, list the fields we haven't implemented'''
 
diff --git a/src/common/xmpp/commands.py b/src/common/xmpp/commands.py
index 974d0162dcfde45048a1975607ec4f6fb5a50682..673cf894d37bf66d43982939709e46a9ee57e712 100644
--- a/src/common/xmpp/commands.py
+++ b/src/common/xmpp/commands.py
@@ -227,7 +227,7 @@ class Command_Handler_Prototype(PlugIn):
             action = request.getTagAttr('command','action')
         except:
             action = None
-        if action == None: action = 'execute'
+        if action is None: action = 'execute'
         # Check session is in session list
         if self.sessions.has_key(session):
             if self.sessions[session]['jid']==request.getFrom():
@@ -279,7 +279,7 @@ class TestCommand(Command_Handler_Prototype):
             session = request.getTagAttr('command','sessionid')
         except:
             session = None
-        if session == None:
+        if session is None:
             session = self.getSessionID()
             sessions[session]={'jid':request.getFrom(),'actions':{'cancel':self.cmdCancel,'next':self.cmdSecondStage},'data':{'type':None}}
         # As this is the first stage we only send a form
diff --git a/src/common/xmpp/debug.py b/src/common/xmpp/debug.py
index 9a238aace3c963bf7d38000f758fe0730861b5da..29321c1ff2e7fb365c969d1f1665667074560f77 100644
--- a/src/common/xmpp/debug.py
+++ b/src/common/xmpp/debug.py
@@ -355,7 +355,7 @@ class Debug:
                 lst2 = self._as_one_list( l )
                 for l2 in lst2: 
                     self._append_unique_str(r, l2 )
-            elif l == None:
+            elif l is None:
                 continue
             else:
                 self._append_unique_str(r, l )
diff --git a/src/common/xmpp/dispatcher_nb.py b/src/common/xmpp/dispatcher_nb.py
index d2ae71dfc0e9b44334554607bf82164d7eb50af2..515a09d10e617bfb06b1c5623c32b20ca920c412 100644
--- a/src/common/xmpp/dispatcher_nb.py
+++ b/src/common/xmpp/dispatcher_nb.py
@@ -287,7 +287,7 @@ class Dispatcher(PlugIn):
 
 		if not direct and self._owner._component:
 			if name == 'route':
-				if stanza.getAttr('error') == None:
+				if stanza.getAttr('error') is None:
 					if len(stanza.getChildren()) == 1:
 						stanza = stanza.getChildren()[0]
 						name=stanza.getName()
diff --git a/src/common/xmpp/roster.py b/src/common/xmpp/roster.py
index 33472c56b94b25a02bdb9207071567eeb39d3900..ff64aca5f682e4f1de93b82ed99a6aba60fc7e1a 100644
--- a/src/common/xmpp/roster.py
+++ b/src/common/xmpp/roster.py
@@ -65,7 +65,7 @@ class Roster(PlugIn):
         """ Subscription tracker. Used internally for setting items state in
             internal roster representation. """
         sender = stanza.getAttr('from')
-        if not sender == None and not sender.bareMatch(
+        if not sender is None and not sender.bareMatch(
         self._owner.User + '@' + self._owner.Server):
             return
         for item in stanza.getTag('query').getTags('item'):
diff --git a/src/dialogs.py b/src/dialogs.py
index 7b1233b158d0da1a0807bc011edfe704ef0801f6..9f9bed0dca44a2672e2f3305da585357de971ba9 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -653,7 +653,7 @@ class AddNewContactWindow:
 	def __init__(self, account = None, jid = None, user_nick = None,
 	group = None):
 		self.account = account
-		if account == None:
+		if account is None:
 			# fill accounts with active accounts
 			accounts = []
 			for account in gajim.connections.keys():
diff --git a/src/gajim.py b/src/gajim.py
index 3c9f675441a244aa6d7a544c856d8f12038090aa..b513034ef2999a553f54d1a36bb0c9be5a2c2702 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -2166,7 +2166,7 @@ class Interface:
 
 	def handle_event_ping_sent(self, account, contact):
 		ctrl = self.msg_win_mgr.get_control(contact.get_full_jid(), account)
-		if ctrl == None:
+		if ctrl is None:
 			ctrl = self.msg_win_mgr.get_control(contact.jid, account)
 		ctrl.print_conversation(_('Ping?'), 'status')
 
@@ -2174,14 +2174,14 @@ class Interface:
 		contact = data[0]
 		seconds = data[1]
 		ctrl = self.msg_win_mgr.get_control(contact.get_full_jid(), account)
-		if ctrl == None:
+		if ctrl is None:
 			ctrl = self.msg_win_mgr.get_control(contact.jid, account)
 		if ctrl:
 			ctrl.print_conversation(_('Pong! (%s s.)') % seconds, 'status')
 
 	def handle_event_ping_error(self, account, contact):
 		ctrl = self.msg_win_mgr.get_control(contact.get_full_jid(), account)
-		if ctrl == None:
+		if ctrl is None:
 			ctrl = self.msg_win_mgr.get_control(contact.jid, account)
 		if ctrl:
 			ctrl.print_conversation(_('Error.'), 'status')
@@ -2393,7 +2393,7 @@ class Interface:
 					shows[show].append(a)
 		for show in shows:
 			message = self.roster.get_status_message(show)
-			if message == None:
+			if message is None:
 				continue
 			for a in shows[show]:
 				self.roster.send_status(a, show, message)
diff --git a/src/lastfm.py b/src/lastfm.py
index a247ef5a4a5a59cef3dc64a63babdae1ea081754..c658a491235562ddbdcc27846cd48809eb7849ff 100644
--- a/src/lastfm.py
+++ b/src/lastfm.py
@@ -147,7 +147,7 @@ class LastFM:
 		lst, the Unix time at which a song has been scrobbled, defaults to that
 		of the last song
 		"""
-		if lst == None:
+		if lst is None:
 			lst = self.getLastScrobbledTime()
 		return int(time()) - lst
 
@@ -158,7 +158,7 @@ class LastFM:
 
 		delay, the delay to use, defaults to self.MAX_DELAY
 		"""
-		if delay == None:
+		if delay is None:
 			delay = self.MAX_DELAY
 		return self.timeSinceLastScrobbled() < delay
 
@@ -189,7 +189,7 @@ class LastFM:
 		songTuple, the tuple representing the song, defaults to the last song
 		"""
 		str = ''
-		if songTuple == None:
+		if songTuple is None:
 			songTuple = self.getLastRecentSong()
 
 		if songTuple != None:
diff --git a/src/message_window.py b/src/message_window.py
index eb4c5af6b7a045284a7e2a58d38cd4c71f4964fd..31e070147d4eee198433336c207e31df09e26b49 100644
--- a/src/message_window.py
+++ b/src/message_window.py
@@ -547,7 +547,7 @@ class MessageWindow(object):
 		else:
 			page_num = key
 			notebook = self.notebook
-			if page_num == None:
+			if page_num is None:
 				page_num = notebook.get_current_page()
 			nth_child = notebook.get_nth_page(page_num)
 			return self._widget_to_control(nth_child)
diff --git a/src/remote_control.py b/src/remote_control.py
index 8170bc434ad7133f00931801aa5a3378f38b9818..8391de9c3edc4e39562bc473505a91806c4f551d 100644
--- a/src/remote_control.py
+++ b/src/remote_control.py
@@ -610,7 +610,7 @@ class SignalObject(dbus.service.Object):
 			return None
 		prim_contact = None # primary contact
 		for contact in contacts:
-			if prim_contact == None or contact.priority > prim_contact.priority:
+			if prim_contact is None or contact.priority > prim_contact.priority:
 				prim_contact = contact
 		contact_dict = DBUS_DICT_SV()
 		contact_dict['name'] = DBUS_STRING(prim_contact.name)