gps pointed out that "== and != work in most cases but its better to use is
and is not as you'll never run into a case where someone's __eq__ or __ne__
method do the wrong thing."

Signed-off-by: Martin J. Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2533 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/tko/compose_query.cgi b/tko/compose_query.cgi
index f02d219..9bae9c7 100755
--- a/tko/compose_query.cgi
+++ b/tko/compose_query.cgi
@@ -239,7 +239,7 @@
 
 def map_kernel(name):
 	global map_kernel_map
-	if map_kernel_map == None:
+	if map_kernel_map is None:
 		map_kernel_map = map_kernel_init()
 
 	if map_kernel_map.has_key(name):
diff --git a/tko/db.py b/tko/db.py
index 08a0e00..d66db28 100644
--- a/tko/db.py
+++ b/tko/db.py
@@ -197,7 +197,7 @@
         def exec_sql():
             sql = ' '.join(cmd)
             numRec = self.cur.execute(sql, values)
-            if max_rows != None and numRec > max_rows:
+            if max_rows is not None and numRec > max_rows:
                 msg = 'Exceeded allowed number of records'
                 raise MySQLTooManyRows(msg)
             return self.cur.fetchall()
@@ -261,7 +261,7 @@
 
     def delete(self, table, where, commit = None):
         cmd = ['delete from', table]
-        if commit == None:
+        if commit is None:
             commit = self.autocommit
         if where and isinstance(where, types.DictionaryType):
             keys = [field + '=%s' for field in where.keys()]
@@ -280,7 +280,7 @@
                 data:
                         dictionary of fields and data
         """
-        if commit == None:
+        if commit is None:
             commit = self.autocommit
         cmd = 'update %s ' % table
         fields = data.keys()
diff --git a/tko/save_query.cgi b/tko/save_query.cgi
index 80c91fc..78d65ea 100755
--- a/tko/save_query.cgi
+++ b/tko/save_query.cgi
@@ -16,7 +16,7 @@
 tm = time.asctime()
 uid = unique_cookie.unique_id('tko_history')
 HTTP_REFERER = os.environ.get('HTTP_REFERER')
-if HTTP_REFERER == None:
+if HTTP_REFERER is None:
 	## fall back strategy for proxy connection
 	## substitute relative url
 	HTTP_REFERER = 'compose_query.cgi?' + urllib.urlencode(dict_url)