mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
18 lines
391 B
Python
18 lines
391 B
Python
import logging
|
|
from .config import VCR
|
|
|
|
# Set default logging handler to avoid "No handler found" warnings.
|
|
try: # Python 2.7+
|
|
from logging import NullHandler
|
|
except ImportError:
|
|
class NullHandler(logging.Handler):
|
|
def emit(self, record):
|
|
pass
|
|
|
|
|
|
logging.getLogger(__name__).addHandler(NullHandler())
|
|
|
|
|
|
default_vcr = VCR()
|
|
use_cassette = default_vcr.use_cassette
|