[db-check] cleanup stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 20 Apr 2010 10:43:12 +0200
branchstable
changeset 5341 0de53140bd29
parent 5340 4de474016568
child 5343 b7eca41d72f9
child 5344 ed4cd1ca96d6
[db-check] cleanup
server/checkintegrity.py
--- a/server/checkintegrity.py	Tue Apr 20 10:42:58 2010 +0200
+++ b/server/checkintegrity.py	Tue Apr 20 10:43:12 2010 +0200
@@ -21,7 +21,7 @@
 
 def has_eid(session, sqlcursor, eid, eids):
     """return true if the eid is a valid eid"""
-    if eids.has_key(eid):
+    if eid in eids:
         return eids[eid]
     sqlcursor.execute('SELECT type, source FROM entities WHERE eid=%s' % eid)
     try:
@@ -171,7 +171,7 @@
         cursor = session.system_sql('SELECT %s FROM %s;' % (column, table))
         for row in cursor.fetchall():
             eid = row[0]
-            # eids is full since we have fetched everyting from the entities table,
+            # eids is full since we have fetched everything from the entities table,
             # no need to call has_eid
             if not eid in eids or not eids[eid]:
                 msg = '  Entity with eid %s exists in the %s table but not in the system table'