fix NameError. Dont forget to commit transactions
authorTony Mack <tmack@cs.princeton.edu>
Thu, 22 Apr 2010 22:35:47 +0000 (22:35 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Thu, 22 Apr 2010 22:35:47 +0000 (22:35 +0000)
sfa/util/table.py

index 0b78740..93ca32e 100644 (file)
@@ -85,7 +85,7 @@ class SfaTable(list):
         for index in indexes:
             self.db.do(index)
         
-        sefl.db.commit()
+        self.db.commit()
     
     def remove(self, record):
         query_str = "DELETE FROM %s WHERE record_id = %s" % \
@@ -183,9 +183,11 @@ class SfaTable(list):
     def drop(self):
         try:
             self.db.do('DROP TABLE IF EXISTS ' + self.tablename)
+            self.db.commit()
         except:
             try:
                 self.db.do('DROP TABLE ' + self.tablename)
+                self.db.commit()
             except:
                 pass