Modify code to accept pluggable logging handlers
This commit is contained in:
+3
-2
@@ -3,6 +3,7 @@
|
||||
|
||||
import logging
|
||||
from time import sleep
|
||||
from typing import Iterable
|
||||
|
||||
import prawcore
|
||||
|
||||
@@ -14,8 +15,8 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class RedditCloner(RedditDownloader, Archiver):
|
||||
def __init__(self, args: Configuration):
|
||||
super(RedditCloner, self).__init__(args)
|
||||
def __init__(self, args: Configuration, logging_handlers: Iterable[logging.Handler] = ()):
|
||||
super(RedditCloner, self).__init__(args, logging_handlers)
|
||||
|
||||
def download(self):
|
||||
for generator in self.reddit_lists:
|
||||
|
||||
Reference in New Issue
Block a user