Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit e812a47

Browse files
committed
(We now kick off refreshing remote profiles from the background, so don't always have something to cancel.)
1 parent de14a8f commit e812a47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/handlers/test_user_directory.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,9 +1121,10 @@ def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
11211121
self.user_dir_handler = hs.get_user_directory_handler()
11221122
self.profile_handler = hs.get_profile_handler()
11231123

1124-
# Cancel the startup call: in the steady-state case we can't rely on it anyway.
1125-
assert self.user_dir_handler._refresh_remote_profiles_call_later is not None
1126-
self.user_dir_handler._refresh_remote_profiles_call_later.cancel()
1124+
if self.user_dir_handler._refresh_remote_profiles_call_later is not None:
1125+
# Cancel the startup call: in the steady-state case we can't rely on
1126+
# it anyway.
1127+
self.user_dir_handler._refresh_remote_profiles_call_later.cancel()
11271128

11281129
def test_public_rooms_have_profiles_collected(self) -> None:
11291130
"""

0 commit comments

Comments
 (0)