kopia lustrzana https://github.com/jupyterhub/repo2docker
Remove explicit passing of logger instance
rodzic
02b41948dd
commit
c7dc5e1841
|
@ -196,7 +196,7 @@ class Repo2Docker(Application):
|
||||||
# Pick a content provider based on URL
|
# Pick a content provider based on URL
|
||||||
picked_content_provider = None
|
picked_content_provider = None
|
||||||
for CP in self.content_providers:
|
for CP in self.content_providers:
|
||||||
cp = CP(self.log)
|
cp = CP()
|
||||||
spec = cp.detect(url, ref=ref)
|
spec = cp.detect(url, ref=ref)
|
||||||
if spec is not None:
|
if spec is not None:
|
||||||
picked_content_provider = cp
|
picked_content_provider = cp
|
||||||
|
|
|
@ -4,6 +4,7 @@ Base classes for repo2docker ContentProviders
|
||||||
ContentProviders accept a `spec` of various kinds, and
|
ContentProviders accept a `spec` of various kinds, and
|
||||||
provide the contents from the spec to a given output directory.
|
provide the contents from the spec to a given output directory.
|
||||||
"""
|
"""
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,8 +14,8 @@ class ContentProviderException(Exception):
|
||||||
|
|
||||||
|
|
||||||
class ContentProvider:
|
class ContentProvider:
|
||||||
def __init__(self, logger):
|
def __init__(self):
|
||||||
self.log = logger
|
self.log = logging.getLogger("repo2docker")
|
||||||
|
|
||||||
def detect(self, repo, ref=None, extra_args=None):
|
def detect(self, repo, ref=None, extra_args=None):
|
||||||
"""Determine compatibility between source and this provider.
|
"""Determine compatibility between source and this provider.
|
||||||
|
|
Ładowanie…
Reference in New Issue