diff --git a/src/plugins/Sql.py b/src/plugins/Sql.py index 3a28e3db4..39d108ec9 100644 --- a/src/plugins/Sql.py +++ b/src/plugins/Sql.py @@ -57,12 +57,12 @@ class Database: self.cursor = self.db.cursor() def query(self, q, *args): - if q.trim().upper().startswith("DROP"): + if q.strip().upper().startswith("DROP"): try: self.cursor.execute(q, args) self.db.commit() except: - "no such table" + "no such table to drop: '%s'" % q else: self.cursor.execute(q, args) self.db.commit()