Example #1
0
 def drop_db(self, server, db):
     # Check before you drop to avoid warning
     try:
         res = server.exec_query("SHOW DATABASES LIKE '%s'" % db)
     except:
         return True  # Ok to exit here as there weren't any dbs to drop
     try:
         q_db = quote_with_backticks(db)
         res = server.exec_query("DROP DATABASE %s" % q_db)
     except:
         return False
     return True
Example #2
0
 def drop_db(self, server, db):
     # Check before you drop to avoid warning
     try:
         res = server.exec_query("SHOW DATABASES LIKE '%s'" % db)
     except:
         return True # Ok to exit here as there weren't any dbs to drop
     try:
         q_db = quote_with_backticks(db)
         res = server.exec_query("DROP DATABASE %s" % q_db)
     except:
         return False
     return True