Add logging for when Battle.Net can't be loaded.

This log message is excessive, but may help with troubleshooting #5174. Need to back this off before release. I'd use the debug flag here, but it's not initialized soon enough.
This commit is contained in:
Daniel Johnson 2023-12-07 16:25:44 -05:00
parent 160e678725
commit 96b4211ea1

View file

@ -14,14 +14,15 @@ from lutris.services.base import BaseService
from lutris.services.service_game import ServiceGame
from lutris.services.service_media import ServiceMedia
from lutris.util.battlenet.definitions import ProductDbInfo
from lutris.util.log import logger
try:
from lutris.util.battlenet.product_db_pb2 import ProductDb
BNET_ENABLED = True
except (ImportError, TypeError):
except (ImportError, TypeError) as ex:
logger.exception("The Battle.net source is unavailable because Google protobuf could not be loaded: %s", ex)
BNET_ENABLED = False
from lutris.util.log import logger
GAME_IDS = {
's1': ('s1', 'StarCraft', 'S1', 'starcraft-remastered'),