Skip to content

Commit

Permalink
Create copy of UserList to prevent recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Oct 19, 2022
1 parent a631b79 commit 3b60c78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plextraktsync/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ def monkey_patch_trakt():
# Monkey patch the class:
# - https://stackoverflow.com/a/28500620/2314626
# - https://stackoverflow.com/a/62160225/2314626
UserListTuple = namedtuple('UserList', trakt.users.UserList._fields + ('type',))
UserListOriginal = trakt.users.UserList
UserListTuple = namedtuple('UserList', UserListOriginal._fields + ('type',))

class UserList(UserListTuple, trakt.users.UserList):
class UserList(UserListTuple, UserListOriginal):
pass

trakt.users.UserList = UserList
Expand Down

0 comments on commit 3b60c78

Please sign in to comment.