You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/libs/pytz_deprecation_shim/_common.py

14 lines
275 B

import sys
_PYTZ_IMPORTED = False
def pytz_imported():
"""Detects whether or not pytz has been imported without importing pytz."""
global _PYTZ_IMPORTED
if not _PYTZ_IMPORTED and "pytz" in sys.modules:
_PYTZ_IMPORTED = True
return _PYTZ_IMPORTED