Skip to content

Commit

Permalink
fix: unhandled exception unloading user profile (#264)
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Usiskin <56369778+jusiskin@users.noreply.github.com>
  • Loading branch information
jusiskin committed Mar 27, 2024
1 parent d246abf commit 62a404b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def clear(self):
)
if user.user_profile:
# https://timgolden.me.uk/pywin32-docs/win32profile__UnloadUserProfile_meth.html
UnloadUserProfile(user.windows_session_user.logon_token, user.user_profile)
UnloadUserProfile(user.logon_token, user.user_profile)
assert user.logon_token is not None
user.logon_token.Close()
self._user_cache.clear()
Expand Down

0 comments on commit 62a404b

Please sign in to comment.