Skip to content

Commit

Permalink
Fix code issue
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Oct 31, 2024
1 parent 2c2ae45 commit 64f8cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hardware/webcam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
Expand Down

0 comments on commit 64f8cc5

Please sign in to comment.