Skip to content

Commit

Permalink
Fix the logging error
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Jul 15, 2013
1 parent d0e9712 commit c10cd15
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions conda/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ def win32link(src, dst):

log = logging.getLogger(__name__)

class NullHandler(logging.Handler):
""" Copied from Python 2.7 to avoid getting
`No handlers could be found for logger "patch"`
http://bugs.python.org/issue16539
"""
def handle(self, record):
pass
def emit(self, record):
pass
def createLock(self):
self.lock = None

log.addHandler(NullHandler())

def _link(src, dst):
try:
Expand Down

0 comments on commit c10cd15

Please sign in to comment.