Skip to content

Commit 7d9940a

Browse files
committed
Fix iteration when removing items
1 parent 8f60d63 commit 7d9940a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

forward/forward.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ async def _handle_automatic_unblock(self):
5353

5454
async def _process_expired_blocks(self):
5555
async with self.config.blocked() as blocked:
56-
for userid, until in blocked.items():
56+
for userid in list(blocked.keys()):
57+
until = blocked[userid]
5758
if datetime.now(timezone.utc).timestamp() > until:
5859
del blocked[userid]
5960

0 commit comments

Comments
 (0)