Remove explicit passing of logger instance
MODIFY
repo2docker/app.py
repo2docker/app.py
@@ -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

MODIFY
repo2docker/contentproviders/base.py
repo2docker/contentproviders/base.py
@@ -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.

Remove explicit passing of logger instance