diff --git a/hardware/webcam/__init__.py b/hardware/webcam/__init__.py index 653776589..162464090 100644 --- a/hardware/webcam/__init__.py +++ b/hardware/webcam/__init__.py @@ -662,7 +662,7 @@ def motion_capture(self, motion_frame="last", motion_threshold=25, motion_area=5 def clear_archive(self, period=365): startDate = datetime.now() - timedelta(days=period) logger.debug(f"Webcam {self.name}: Start clearing archive older than {startDate}") - for counter in range(10): + for _ in range(10): while Path.exists(self.__ARCHIVE_LOCATION.joinpath(self.id, startDate.strftime("%Y/%m/%d"))): start = time() rmtree(self.__ARCHIVE_LOCATION.joinpath(self.id, startDate.strftime("%Y/%m/%d")))