Skip to content

Commit

Permalink
Merge pull request #101 from IvanMalison/minor_cleanup
Browse files Browse the repository at this point in the history
Clean up __init__.py .
  • Loading branch information
kevin1024 committed Sep 16, 2014
2 parents d9c2b4b + 0d31350 commit 20057a6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions vcr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
from .config import VCR

# Set default logging handler to avoid "No handler found" warnings.
import logging
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()
logging.getLogger(__name__).addHandler(NullHandler())


def use_cassette(path, **kwargs):
return default_vcr.use_cassette(path, **kwargs)
default_vcr = VCR()
use_cassette = default_vcr.use_cassette

0 comments on commit 20057a6

Please sign in to comment.