Wrap import of MySQLdb in try/catch