How do I check if an insert was successful with MySQLdb in Python?,cursor.close()