Skip to content

Commit

Permalink
Don't use strtobool from distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Aug 26, 2024
1 parent da66239 commit e1abfd6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ RUN apt-get update && \
libpq-dev \
libssl-dev libffi-dev \
python3.9 python3.9-dev python3.9-venv libpython3.9-dev libpython3.9 \
python3.9-distutils \
unixodbc-dev git lsb-release \
alien odbcinst

Expand Down
1 change: 0 additions & 1 deletion Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ RUN apt-get update && \
libsasl2-dev \
libssl-dev libffi-dev \
python3.9 python3.9-dev python3.9-venv libpython3.9-dev libpython3.9 \
python3.9-distutils \
unixodbc-dev git && \
apt-get clean -qq -y && \
apt-get autoclean -qq -y && \
Expand Down
5 changes: 2 additions & 3 deletions soda/core/soda/telemetry/soda_telemetry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import logging
import os
import platform
from distutils.util import strtobool
from typing import Dict

from opentelemetry import trace
Expand Down Expand Up @@ -85,8 +84,8 @@ def __init__(self, test_mode: bool):

def __setup(self):
"""Set up Open Telemetry processors and exporters for normal use."""
local_debug_mode = self.soda_config.get_value("telemetry_local_debug_mode") or bool(
strtobool(os.getenv("telemetry_local_debug_mode", "false"))
local_debug_mode = self.soda_config.get_value("telemetry_local_debug_mode") or (
os.getenv("telemetry_local_debug_mode", "false").lower() in ("y", "yes", "t", "true", "on", "1")
)

if local_debug_mode or logger.getEffectiveLevel() == logging.DEBUG:
Expand Down

0 comments on commit e1abfd6

Please sign in to comment.