Bug 1619871 - Fix Python 3 test regression r=whimboo

Make sure we don't try to import arsenic when the condprofile client is used.

Differential Revision: https://phabricator.services.mozilla.com/D65292

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tarek Ziadé 2020-03-04 08:57:25 +00:00
Родитель 216e4fb664
Коммит 2241078072
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -100,11 +100,14 @@ def get_logger():
# bridge for Arsenic
if sys.version_info.major == 3:
from arsenic import connection
from structlog import wrap_logger
connection.log = wrap_logger(new_logger)
try:
from arsenic import connection
from structlog import wrap_logger
connection.log = wrap_logger(new_logger)
except ImportError:
# Arsenic is not installed for client-only usage
pass
logger = new_logger
return logger