Skip to content

Commit 8a4e7c5

Browse files
committed
Add warning on compression modules import
1 parent 2d5b1aa commit 8a4e7c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clickhouse_driver/compression/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import importlib
2+
import logging
23

34
from .. import errors
45
from ..protocol import CompressionMethodByte
56

7+
logger = logging.getLogger(__name__)
8+
69

710
def get_compressor_cls(alg):
811
try:
912
module = importlib.import_module('.' + alg, __name__)
1013
return module.Compressor
1114

1215
except ImportError:
16+
logger.warning('Unable to import module %s', alg, exc_info=True)
1317
raise errors.UnknownCompressionMethod(
1418
"Unknown compression method: '{}'".format(alg)
1519
)

0 commit comments

Comments
 (0)