Skip to content

Commit e2e1d49

Browse files
committed
fix: migrate code to 0.3
1 parent 02451fb commit e2e1d49

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

Contents/Code/plex_api_helper.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -725,10 +725,6 @@ def get_user_info(token):
725725
>>> get_user_info(token='...')
726726
...
727727
"""
728-
global plex
729-
if not plex:
730-
plex = setup_plexapi()
731-
732728
try:
733729
return MyPlexAccount(token=token)
734730
except Exception:
@@ -755,8 +751,6 @@ def is_server_owner(user):
755751
>>> is_server_owner(user=...)
756752
...
757753
"""
758-
global plex
759-
if not plex:
760-
plex = setup_plexapi()
754+
plex = setup_plexapi()
761755

762756
return plex.account().username in {user.email, user.username}

0 commit comments

Comments
 (0)