Commit ed64d8b6 authored by xa's avatar xa

avoid snappt

parent e35d15c3
Pipeline #659 failed with stage
import logging
import snappy
try:
import snappy
except ImportError:
pass
import zlib
......@@ -28,8 +31,11 @@ class DeflateHandler:
class SnappyHandler:
def __init__(self):
self._compressor = snappy.StreamCompressor()
self._decompressor = snappy.StreamDecompressor()
try:
self._compressor = snappy.StreamCompressor()
self._decompressor = snappy.StreamDecompressor()
except Exception as error:
raise RuntimeError('snappy required') from error
self.log = logging.getLogger(__name__)
def compress(self, data):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment