diff --git a/bdfr/connector.py b/bdfr/connector.py index c33c82ff..86ded1e8 100644 --- a/bdfr/connector.py +++ b/bdfr/connector.py @@ -61,7 +61,7 @@ def __init__(self, args: Configuration, logging_handlers: Iterable[logging.Handl self._apply_logging_handlers(itertools.chain(logging_handlers, [file_log])) self.run_time = datetime.now().isoformat() self._setup_internal_objects() - self.existcount=0 + self.existcount = 0 self.reddit_lists = self.retrieve_reddit_lists() diff --git a/bdfr/downloader.py b/bdfr/downloader.py index 0ccc64fa..e62c930a 100644 --- a/bdfr/downloader.py +++ b/bdfr/downloader.py @@ -112,15 +112,15 @@ def _download_submission(self, submission: praw.models.Submission): if destination.exists(): logger.debug(f"File {destination} from submission {submission.id} already exists, continuing") if self.args.stop_on_exist and not submission.stickied: - self.existcount+=1 - if self.existcount>=5: - logger.warning(f"Prevously-downloaded threshold met, exiting") + self.existcount += 1 + if self.existcount >= 5: + logger.warning("Prevously-downloaded threshold met, exiting") exit(0) continue elif not self.download_filter.check_resource(res): logger.debug(f"Download filter removed {submission.id} file with URL {submission.url}") continue - self.existcount=0 + self.existcount = 0 try: res.download({"max_wait_time": self.args.max_wait_time}) except errors.BulkDownloaderException as e: