Remove explicit passing of logger instance

pull/242/head
Tim Head 2018-10-12 16:29:12 +02:00
rodzic 02b41948dd
commit c7dc5e1841
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -196,7 +196,7 @@ class Repo2Docker(Application):
# Pick a content provider based on URL
picked_content_provider = None
for CP in self.content_providers:
cp = CP(self.log)
cp = CP()
spec = cp.detect(url, ref=ref)
if spec is not None:
picked_content_provider = cp

Wyświetl plik

@ -4,6 +4,7 @@ Base classes for repo2docker ContentProviders
ContentProviders accept a `spec` of various kinds, and
provide the contents from the spec to a given output directory.
"""
import logging
import os
@ -13,8 +14,8 @@ class ContentProviderException(Exception):
class ContentProvider:
def __init__(self, logger):
self.log = logger
def __init__(self):
self.log = logging.getLogger("repo2docker")
def detect(self, repo, ref=None, extra_args=None):
"""Determine compatibility between source and this provider.