1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-30 19:46:25 +00:00
bazarr/libs/rebulk/remodule.py
2021-03-22 10:26:26 -04:00

21 lines
523 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Uniform re module
"""
# pylint: disable-all
import os
import logging
log = logging.getLogger(__name__).log
REGEX_ENABLED = False
if os.environ.get('REBULK_REGEX_ENABLED') in ["1", "true", "True", "Y"]:
try:
import regex as re
REGEX_ENABLED = True
except ImportError:
log.warning('regex module is not available. Unset REBULK_REGEX_ENABLED environment variable, or install regex module to enabled it.')
import re
else:
import re